Skip to content

Commit 069724f

Browse files
committed
Explicitly tell clang-tidy where the config file is
For some reason clang-tidy will behave differently when run from different current directories if the config file is not set explicitly. It is supposed to find the source files to check in the compile_commands.json file and find the config from there, but apparently that is not the whole truth!?
1 parent 3bc0f67 commit 069724f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ if (CLANG_TIDY)
286286

287287
add_custom_target(clang-tidy
288288
${CLANG_TIDY}
289+
--config-file ${CMAKE_SOURCE_DIR}/.clang-tidy
289290
-p ${CMAKE_BINARY_DIR}
290291
${CT_CHECK_FILES}
291292
)

0 commit comments

Comments
 (0)