With clang-tidy, you can put different .clang-tidy configs in different directories which allows different rules to be set in different places.
This is necessary to do when the code base gets large enough to have:
Multiple Teams
Third party libraries
Mixes of C and C++
Currently this action will force all directories to follow the root .clang-tidy if you set config_file: ''.
Desired behaviour on at least clang-tidy-15:
If you set config_file and clang_tidy_checks to an empty string, neither are sent to the clang-tidy.
If you get config_file to something, config_file is sent to clang-tidy.
If you get config_file to nothing and clang_tidy_checks to something, clang_tidy_checks is sent to clang-tidy.
If you get config_file to something and clang_tidy_checks to something, config_file is sent to clang-tidy.
With clang-tidy, you can put different
.clang-tidy
configs in different directories which allows different rules to be set in different places.This is necessary to do when the code base gets large enough to have:
Currently this action will force all directories to follow the root
.clang-tidy
if you setconfig_file: ''
.Desired behaviour on at least clang-tidy-15:
If you set
config_file
andclang_tidy_checks
to an empty string, neither are sent to the clang-tidy. If you getconfig_file
to something,config_file
is sent to clang-tidy. If you getconfig_file
to nothing andclang_tidy_checks
to something,clang_tidy_checks
is sent to clang-tidy. If you getconfig_file
to something andclang_tidy_checks
to something,config_file
is sent to clang-tidy.