Browse Source

Fix cmake clang format (#173)

* fix bad directory name of source files

* add explicit option for using .clang-format file

* fix Clang Tidy CI check
pull/176/head v0.0.4
andregri 3 years ago
committed by GitHub
parent
commit
9005eee203
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      cmake/clang-format.cmake
  2. 2
      housekeeping/clang-tidy.sh

5
cmake/clang-format.cmake

@ -1,7 +1,7 @@
file(GLOB_RECURSE
ALL_CXX_SOURCE_FILES
core/*.[ch]pp
core/*.[ch]
src/*.[ch]pp
src/*.[ch]
test/*.[ch]pp
test/*.[ch]
)
@ -16,6 +16,7 @@ if(CLANG_FORMAT_BIN)
add_custom_target(
clang-format
COMMAND "${CLANG_FORMAT_BIN}"
-style=file
-i
${ALL_CXX_SOURCE_FILES}
)

2
housekeeping/clang-tidy.sh

@ -23,7 +23,7 @@ cd $(dirname $0)/..
FILES=$(get_files)
CLANG_TIDY=$(which clang-tidy)
RUN_CLANG_TIDY=$(which run-clang-tidy.py)
RUN_CLANG_TIDY=$(which run-clang-tidy.py) || RUN_CLANG_TIDY=$(which run-clang-tidy)
# filter compile_commands.json
echo ${FILES} | python3 ./housekeeping/filter_compile_commands.py -p ${BUILD_DIR}

Loading…
Cancel
Save