Introduce .clang-tidy-ignore

Lei Yu yulei.sh at bytedance.com
Mon Apr 25 13:46:04 AEST 2022


When running clang-tidy on repo CI, there are cases where we want to
ignore specific files or directories, e.g. ignore the generated files
by sdbusplus, the files in the unit test directory, etc.

This mail is to introduce the way to add .clang-tidy-ignore to make
clang-tidy ignore the specific files.

In this [patch][1], the unit-test.py is added some logic to check the
.clang-tidy-ignore, use `git ls-files` to filter the .c/.cpp/.cc
files, and filter out the files in .clang-tidy-ignore, and pass the
result list to `run-clang-tidy`, then only the necessary files are
passed to the clang-tidy.

Please have a review. (And I would say clang-tidy is really a good
tool that does find bugs in the code :)

[1]: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-build-scripts/+/53234

-- 
BRs,
Lei YU


More information about the openbmc mailing list