-
Notifications
You must be signed in to change notification settings - Fork 1.4k
build(ci): Run clang-tidy and add license header annotations #15284
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
Conversation
✅ Deploy Preview for meta-velox ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
c9899f5 to
f13002c
Compare
20a99db to
aac2d99
Compare
use re instead of regex fix git ownership and build dir name fix fetch depth debug full checkout use proper merge base
aac2d99 to
6509eba
Compare
…manual stage. It will now diff against HEAD in pre-commit -> pre-commit using staged files.
…son found This might skipp running clang-tidy locally if the contributor hasn't setup correctly but this is imo much more acceptable (due to CI) than making peoples pre-commit fail spuriosly.
|
|
||
| - run: uv tool install clang-tidy==18.1.8 | ||
|
|
||
| - name: Configure Maximal Build |
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.
Why do we need to configure the build?
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.
clang-tidy needs the compilation database ('compile_commands.json')
czentgr
left a comment
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.
Thanks!
pedroerp
left a comment
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.
Accepting as @czentgr has reviewed it. Thanks @assignUser
| header_comment = "" | ||
|
|
||
| message(log_to, "Fix : " + filepath) | ||
| if os.environ.get("GITHUB_ACTIONS"): |
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 didn't realize this but this change causes build failures in PrestoC++. Namely, it re-generates the protocol in github and this adds the new error message to the output causing compile errors.
We do a regenerate in the CI to try and ensure java-cpp protocol compatibility.
We call "remove" explicitly.
It might seems like overkill to use the adapters image but for clang-tidy to run it needs
compile-commands.json, so we need to run cmake, which needs the dependencies.I use
--line-filterto only output warnings on changed lines, other warnings would not show up as annotations anyway and take very long.The clang-tidy job only runs when there are changes to C++ files.
Closes: #15047
Closes: #15050