-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[CPU] Enable clang-tidy-18 checks #28725
base: master
Are you sure you want to change the base?
Conversation
84932f6
to
5ca41cd
Compare
7e615e7
to
f50c11d
Compare
f50c11d
to
9cb1744
Compare
cfefad7
to
f4774e6
Compare
f4774e6
to
ca7371e
Compare
ca7371e
to
6da0449
Compare
@@ -3,7 +3,7 @@ | |||
# | |||
|
|||
if(ENABLE_CLANG_TIDY) | |||
set(CLANG_TIDY_REQUIRED_VERSION 15 CACHE STRING "clang-tidy version to use") | |||
set(CLANG_TIDY_REQUIRED_VERSION 18 CACHE STRING "clang-tidy version to use") |
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.
@ilya-lavrenov We want to bump up the version to 18. This is a default clang version on Ubuntu24. The reason - 18 version contains a feature misc-include-cleaner
, which will allow us to fix most of the include mess and implicit include dependencies we have.
After we fix the includes, we will be able to implement an independent CI workflow for clang-tidy, which will only check the changed files independently and will not require to compile all the source files with clang-tidy enabled. Without fixing the includes those file-by-file checks may fail because of missing includes.
This will allow us to implement such workflow for all the architectures with very small execution time, basically it scales much better than building the whole project with clang-tidy.
The downside is that for clang-format we will have version 15 required, but for clang-tidy - version 18. And, for example, to install clang-tidy-18 on ubuntu22 it is required to add a ppa to apt sources. From my perspective these cons are not that important, since we already support Ubuntu24 where clang-tidy-18 is the default one.
What do you think?
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 don't see a problem if we will use different versions of clang-family tools on different systems.
Once most of developers migrate to U24 as development machine, we can switch to clang-format-18
@dmitry-gorokhov Ready to merge |
Details:
Tickets: