-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
chore: bump clang-tidy to 13 #3997
Conversation
40537a1
to
f5502ae
Compare
Signed-off-by: Henry Schreiner <[email protected]>
f5502ae
to
e863fbb
Compare
@henryiii Yeah, I've been waiting to do this PR until 14.0.5 is released. I've already backported the fix to llvm 14: llvm/llvm-project#55717 |
@@ -73,5 +73,3 @@ CheckOptions: | |||
value: true | |||
|
|||
HeaderFilterRegex: 'pybind11/.*h' | |||
|
|||
WarningsAsErrors: '*' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@henryiii Any reason this is removed? If there are explicit checks which are giving warnings, they can be negated as errors in this part of the list. (ie. the same way as they can be negated from globs for the checksparam.
@@ -44,7 +44,7 @@ jobs: | |||
- name: Configure | |||
run: > | |||
cmake -S . -B build | |||
-DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy)" | |||
-DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--use-color;--warnings-as-errors=*" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Skylion007 Warnings as errors is set here. It's more inconvenient running this locally with warnings as errors, since it stops the compilation (requiring --keep-going
, for example). Notice the "local run" text changes too. It's better to have this as a user-control via CMAKE_CXX_CLANG_TIDY
vs. always forcing it. (IMO)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess there isn't much difference here since we have fixed the code base with nolints for all relevant errors. It would be useful for checks that are flaky like bugprone-unused-raii etc... so that new non-errant instances could be found if we ever want to enable it or if suppression stopped working for some reason (like in unpatched clang-tidy 14).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you like it then, or would you rather it the old way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either way works.
I wasn't able to bump to clang-tidy 14 because it seems to be buggy about respecting the NOLINTNEXTLINE's in macros. Minor adjustments to running.