trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

Add ENABLE_CLANG_TIDY option

Open masaori335 opened this issue 1 year ago • 1 comments

CMake has a property called <LANG>_CLANG_TIDY. This adds a function, clang_tidy_check, that set the property to the target if ENABLE_CLANG_TIDY is true. If it's enabled, clang-tidy check the rule in the .clang-tidy file when the target is compiled.

https://cmake.org/cmake/help/v3.29/prop_tgt/LANG_CLANG_TIDY.html

The option is slightly different from what we used to have with auto tools, make clang-tidy, but this looks straight forward with cmake.

masaori335 avatar Feb 15 '24 07:02 masaori335

This only has tscore and tsutil for the clang_tidy_check target. If this approach looks good, I'll add more targets.

masaori335 avatar Feb 15 '24 07:02 masaori335