Hello!
I am running clang-tidy from CMake. clang-tidy is running all of the other checks (configured in .clang-tidy
), but it is ignoring my format style options. I am just trying to lint the format, not automatically fix the format.
I have tried:
In CMakeLists.txt
:
set_target_properties(
${CMAKE_PROJECT_NAME}
PROPERTIES
LINKER_LANGUAGE CXX
CXX_CLANG_TIDY "${CLANG_TIDY_EXE};-format-style='llvm'")
I have also tried in .clang-tidy
:
FormatStyle: llvm
I have also tried setting the format style to file
and adding BasedOnStyle: LLVM
to .clang-format
in the same folder as .clang-tidy
. Running clang-format separately works as expected.
What am I missing?