erenon / bazel_clang_tidy

Run clang-tidy on Bazel C++ targets directly, efficiently, with caching enabled
MIT License
109 stars 58 forks source link

Allow disabling clang-tidy only for headers #76

Closed keith closed 1 month ago

keith commented 1 month ago

Since bazel doesn't automatically build headers in isolation unless you enable parse_headers (which only recently works at all), headers may not pass clang-tidy in isolation. This adds a new no-clang-tidy-headers tag that can be added to libraries so that only their source files are clang-tidy'd

erenon commented 1 month ago

Thanks! merged. I think it is wasteful to check the extension multiple types (in check_valid_file_types and at the end), perhaps those two should be merged.