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

clang-tidy: add more modernize-* checks #71

Merged
merged 3 commits into from
Apr 16, 2024

Conversation

ManuelHu
Copy link
Collaborator

@ManuelHu ManuelHu commented Apr 11, 2024

I kept all checks that have a large volume of changes disabled.

fixes #36

@gipert
Copy link
Member

gipert commented Apr 11, 2024

Could you check again what is the situation with #36?

@ManuelHu
Copy link
Collaborator Author

ManuelHu commented Apr 15, 2024

I implemented a simple pre-commit hook for clang-tidy

  • It does not fail if clang-tidy is not installed. Unfortunately there is no way to see this from the CLI output.
  • It works with a separate build dir
  • Unfortunately it "fails" if it applied any fixes, even when no error is remaining after that (that is just how the exit code of clang-tidy works...)

Currently there is no check that one used -DCMAKE_EXPORT_COMPILE_COMMANDS=ON for cmake. Should we set this globally in the CMakeLists? Apart from a small (currently < 100 KB) storage footprint, I don't see any explicit downsides from it...

@ManuelHu ManuelHu merged commit f0df7ca into legend-exp:main Apr 16, 2024
5 checks passed
@ManuelHu ManuelHu deleted the more-clang-tidy branch April 16, 2024 18:21
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.

Run clang-tidy as pre-commit hook
2 participants