Re-run clang-tidy if config file changes
Using CMAKE_CXX_CLANG_TIDY
is great as it's very simple. However, one thing it doesn't do well is to re-run the tool if .clang-tidy
changes. A potential hack/work-around can be seen in #18926 (comment 518804) but this is quite invasive.
Is there a better way to do this? If not, should CMake be changed, maybe by introducing a new variable that holds the config file name? Alternatively, could it auto-detect such a file to improve the out-of-the-box experience?