ZedThree / clang-tidy-review

Create a pull request review based on clang-tidy warnings
MIT License
88 stars 44 forks source link

Allow setting not setting config file #95

Closed bwrsandman closed 11 months ago

bwrsandman commented 11 months ago

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:

  1. Multiple Teams
  2. Third party libraries
  3. 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.