Skip to content

Conversation

@assignUser
Copy link
Collaborator

@assignUser assignUser commented Oct 25, 2025

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-filter to 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

@netlify
Copy link

netlify bot commented Oct 25, 2025

Deploy Preview for meta-velox ready!

Name Link
🔨 Latest commit 3c3ddb6
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/690f5b3ac88c790008069f4d
😎 Deploy Preview https://deploy-preview-15284--meta-velox.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 25, 2025
@assignUser assignUser changed the title Run clang-tidy in CI build(ci): Run clang-tidy Oct 25, 2025
@assignUser assignUser force-pushed the run-clang-tidy-ci branch 12 times, most recently from c9899f5 to f13002c Compare October 26, 2025 18:15
@assignUser assignUser marked this pull request as ready for review November 1, 2025 15:24
@assignUser assignUser changed the title build(ci): Run clang-tidy build(ci): Run clang-tidy and add license header annotations Nov 1, 2025
use re instead of regex

fix git ownership and build dir name

fix fetch depth

debug

full checkout

use proper merge base
…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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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')

Copy link
Collaborator

@czentgr czentgr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@pedroerp pedroerp left a 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

@pedroerp pedroerp added the ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall label Nov 14, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 17, 2025

@Yuhta has imported this pull request. If you are a Meta employee, you can view this in D87232092.

@meta-codesync
Copy link

meta-codesync bot commented Nov 17, 2025

@Yuhta merged this pull request in bd0756c.

header_comment = ""

message(log_to, "Fix : " + filepath)
if os.environ.get("GITHUB_ACTIONS"):
Copy link
Collaborator

@czentgr czentgr Nov 21, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add annotation output to license-header.py Run clang-tidy in CI

5 participants