Support static analysis by clang-tidy#2834
Support static analysis by clang-tidy#2834ti-chi-bot merged 6 commits intopingcap:masterfrom solotzg:use-clang-tidy
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
I think the release note should be "None" cause it is not a change for the users? |
|
/run-all-tests |
clang-tidy check is enabled. @JaySon-Huang @fuzhe1989 PTAL |
|
/run-all-tests |
| -DCMAKE_BUILD_TYPE=RELWITHDEBINFO \ | ||
| -DUSE_CCACHE=OFF \ | ||
| -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | ||
| python3 ${SRCPATH}/release-centos7/build/fix_compile_commands.py --file_path=${BUILD_DIR}/compile_commands.json --includes=/tmp/usr/lib64/clang/12.0.0/include --load_diff_files_from "/tmp/tiflash-diff-files.json" |
There was a problem hiding this comment.
So we only enable those static analyses on those files changed in PR. And if those files do not pass the check, it will make the build fail?
I guess it is not a good idea cause it will bring lots of Irrelevant changes when you change a big file.
Maybe we should clean those warnings before enabling a lint?
Ref: pingcap/tidb#22979
There was a problem hiding this comment.
I think we should merge this PR to finish the task. Then use another PR to disable static-analysis temporarily.
|
Can we merge it first? If necessary, someone could disable static-analysis in another PR. |
|
/merge |
|
@solotzg: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: c719da0 |
|
Is clang-tidy enabled now? |
What problem does this PR solve?
Problem Summary:
What is changed and how it works?
What's Changed:
.clang-tidyis from https://github.com/ClickHouse/ClickHouse/blob/master/.clang-tidyCheck List
Tests
Release note