chore: enable targeted bugprone clang-tidy checks#500
Conversation
|
Hi @Loyal-Young, thanks for your contribution! We'd like to enable clang-tidy and fix existing issues together in one PR — would you be able to do that? See #419 as an example. |
Thanks for the guidance. Sorry for late reply ,I had some final-exams last two weeks. I'll run the enabled bugprone checks, fix the existing violations in this PR, and update it following #419. |
|
Thanks for pointing me to #419. I reproduced the checks locally with clang-tidy 18.1.8. Unlike #419, which enables a single check, enabling the full
Many of these require behavior-sensitive changes rather than mechanical fixes. Would you prefer that I:
I will proceed based on your preference. |
|
Thanks for checking this and sharing the numbers. Given that enabling the whole For this PR, please enable a small explicit subset of Suggested direction:
We can follow up with separate PRs for the noisier checks once the first batch is in. |
|
Updated as suggested. The PR now enables only bugprone-multiple-statement-macro and bugprone-sizeof-expression, and all existing diagnostics from these checks have been fixed. I also ran clang-tidy across all 447 compilation database entries and verified cube_test passes. |
Fixes #293.
What changed
bugprone-multiple-statement-macroandbugprone-sizeof-expressionexplicitly in.clang-tidy.bugprone-*group disabled.bugprone-sizeof-expressiondiagnostics incube_test.cc.Validation
cube_testtarget successfully.cube_test: 6 tests passed.git diff --check