Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static code analysis. #143

Merged
merged 63 commits into from
Dec 14, 2024
Merged

Add static code analysis. #143

merged 63 commits into from
Dec 14, 2024

Conversation

crud89
Copy link
Owner

@crud89 crud89 commented Dec 11, 2024

Describe the pull request

This PR adds clangcl presets that are intended to be used during CI for static code analysis using clang-tidy. From now on, each PR executes checks against static code analysis and automated tests (see #129). Alongside this, lots of issues with the code base have been addressed. Most importantly:

  • There's a new SharedObject base class for objects that enable shared_from_this. This also allows for more efficient allocation of shared pointers, so it's the recommended way to implement objects that require shared ownership.
  • Many objects now store a WeakPtr to their parent device instead of a reference. This way, it was possible to catch several issues where resource release must happen in order to prevent invalid memory access.
  • Also the implementation of pImpl pointers has changed and the Implements base (which was never really helpful anyway) has been removed.
  • The rest are a ton (!) of related changes that all addressed issues from code analysis.

crud89 added 30 commits November 8, 2024 13:20
@crud89 crud89 added the Build 🛠 Issues that involve the build process. label Dec 11, 2024
@crud89 crud89 added this to the Alpha #04 milestone Dec 11, 2024
@crud89 crud89 self-assigned this Dec 11, 2024
@crud89 crud89 force-pushed the code-analysis branch 2 times, most recently from 2d4b48a to fb33e9a Compare December 12, 2024 17:59
This prevents errors to be created for warnings, but we don't care for testing (that's what we have the tidy step for).
@crud89
Copy link
Owner Author

crud89 commented Dec 13, 2024

Run: checks

@crud89 crud89 merged commit ef2704e into main Dec 14, 2024
3 checks passed
@crud89 crud89 deleted the code-analysis branch December 14, 2024 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build 🛠 Issues that involve the build process.
Projects
Status: v0.4.1
Development

Successfully merging this pull request may close these issues.

1 participant