-
Notifications
You must be signed in to change notification settings - Fork 434
feat(ci): Add clang-tidy static analysis to CI pipeline #1040
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| Checks: 'bugprone-use-after-move,bugprone-dangling-handle,performance-move-const-arg,performance-unnecessary-copy-initialization,-clang-diagnostic-unused-command-line-argument' | ||
| WarningsAsErrors: '' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| HeaderFilterRegex: '.*' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| .PHONY: tidy | ||
| tidy: | ||
| @find mooncake-transfer-engine -name "*.cpp" | head -5 | xargs -P $(shell nproc) -I {} clang-tidy-20 -p build --warnings-as-errors='*' {} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The use of Additionally, it's better practice to configure |
||
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.
This is a good initial set of checks. To further improve code quality, consider enabling more check groups.
clang-tidyoffers many useful checks that can catch subtle bugs and performance issues. For example, you could enable broader sets of checks likebugprone-*,performance-*, andmodernize-*, and then explicitly disable any specific checks that are too noisy for this project. This iterative approach will help maximize the benefits of static analysis.