Skip to content

Conversation

@gnawme
Copy link
Contributor

@gnawme gnawme commented Nov 17, 2025

Added 4 additional bugprone clang-tidy checks and applied fixes

  1. bugprone-assert-side-effect
  2. bugprone-dangling-handle
  3. bugprone-forward-declaration-namespace
  4. bugprone-inaccurate-erase

Summary

These checks improve code safety and correctness by:

  • Preventing subtle bugs from dangling references
  • Ensuring consistent namespace declarations
  • Fixing incorrect container erase patterns
  • Eliminating side effects in assertions

Note that this pass seems to mostly have caught back-sliding code.

larshg
larshg previously approved these changes Nov 18, 2025
@mvieth
Copy link
Member

mvieth commented Nov 19, 2025

Note that this pass seems to mostly have caught back-sliding code.

No, I think all the code related to "nurbs" has simply never been checked in the clang-tidy GitHub action. That code is not built by default. You could try to add -DBUILD_surface_on_nurbs=ON to the GitHub action so we can see whether all is fixed now or whether there is more (edit: and to make sure there is no back-sliding in the future 🙂 ).

@gnawme
Copy link
Contributor Author

gnawme commented Nov 19, 2025

Note that this pass seems to mostly have caught back-sliding code.

No, I think all the code related to "nurbs" has simply never been checked in the clang-tidy GitHub action. That code is not built by default. You could try to add -DBUILD_surface_on_nurbs=ON to the GitHub action so we can see whether all is fixed now or whether there is more (edit: and to make sure there is no back-sliding in the future 🙂 ).

Ah, OK. I normally omit the 3rdparty folder when I run clang-tidy on my local repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants