Skip to content

[WIP] Add clang-tidy checks to CI - #3553

Open
AmirhosseinPoolad wants to merge 3 commits into
masterfrom
ci_clang_tidy
Open

[WIP] Add clang-tidy checks to CI#3553
AmirhosseinPoolad wants to merge 3 commits into
masterfrom
ci_clang_tidy

Conversation

@AmirhosseinPoolad

Copy link
Copy Markdown
Contributor

Adds automatic linter runs for vpr, libarchfpga and librrgraph to CI. Should wait until #3551 and #3552 are merger before this.

@github-actions github-actions Bot added the infra Project Infrastructure label May 26, 2026
@AlexandreSinger

Copy link
Copy Markdown
Contributor

A lot of the warnings and errors I see in the lint test I think are resolved in this PR that I was working on: #3527

Let me know if you have any comments.

@github-actions github-actions Bot added the lang-cpp C/C++ code label May 26, 2026
@AmirhosseinPoolad

Copy link
Copy Markdown
Contributor Author

It takes *way* too long to run this in the CI. Not sure if I like it.

@AlexandreSinger

Copy link
Copy Markdown
Contributor

It takes way too long to run this in the CI. Not sure if I like it.

My guess is that clang-tidy is actually running clang under the hood to do this (actually I am almost certain it is). I wonder if we can cache that build like we do the other builds.

@hzeller

hzeller commented May 27, 2026

Copy link
Copy Markdown
Contributor

For caching, I have written a clang-tidy runner that runs clang-tidy in parallel and also builds a directory where it caches results; so next time around it only has to process changed files or files that depend on changed files.
Using the github cache, you can use that to restore the cache, then next time it will be fast.

https://github.com/hzeller/dev-tools/blob/main/run-clang-tidy-cached.cc

Might be interesting to play with.

@AmirhosseinPoolad

Copy link
Copy Markdown
Contributor Author

For caching, I have written a clang-tidy runner that runs clang-tidy in parallel and also builds a directory where it caches results; so next time around it only has to process changed files or files that depend on changed files. Using the github cache, you can use that to restore the cache, then next time it will be fast.

https://github.com/hzeller/dev-tools/blob/main/run-clang-tidy-cached.cc

Might be interesting to play with.

Thanks a lot! This should be very helpful.

@vaughnbetz

Copy link
Copy Markdown
Contributor

No rush, but are you still working to get this in @AmirhosseinPoolad ?

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

Labels

infra Project Infrastructure lang-cpp C/C++ code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants