mirror of
https://github.com/slsdetectorgroup/aare.git
synced 2026-11-25 03:07:55 +01:00
updated clang-format commands
This commit is contained in:
1 parent
af25aea684
commit
6f7174ecba
1 file changed
+7
-17
+7
-17
@@ -492,9 +492,8 @@ endif()
|
||||
add_custom_target(
|
||||
check-format
|
||||
COMMAND
|
||||
find \\ (-name "*.cpp" -o -name "*.hpp" \\) -not -path "./build/*" | xargs
|
||||
-I {} -n 1 -P 10 bash -c
|
||||
"clang-format -Werror -style=\"file:.clang-format\" {} | diff {} -"
|
||||
bash -c
|
||||
[=[ find \( -name "*.cpp" -o -name "*.hpp" \) -not -path "./build/*" | xargs -I {} -n 1 -P 10 bash -c "clang-format -Werror -style=\"file:.clang-format\" {} | diff {} -" ]=]
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Checking code formatting with clang-format"
|
||||
VERBATIM)
|
||||
@@ -502,8 +501,8 @@ add_custom_target(
|
||||
add_custom_target(
|
||||
format-files
|
||||
COMMAND
|
||||
find \\ (-name "*.cpp" -o -name "*.hpp" \\) -not -path "./build/*" | xargs
|
||||
-I {} -n 1 -P 10 bash -c "clang-format -i -style=\"file:.clang-format\" {}"
|
||||
bash -c
|
||||
[=[ find \( -name "*.cpp" -o -name "*.hpp" \) -not -path "./build/*" | xargs -I {} -n 1 -P 10 bash -c "clang-format -i -style=\"file:.clang-format\" {}" ]=]
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "Formatting with clang-format"
|
||||
VERBATIM)
|
||||
@@ -518,18 +517,9 @@ endif()
|
||||
add_custom_target(
|
||||
clang-tidy
|
||||
COMMAND
|
||||
find \\ (-path
|
||||
"./src/*"
|
||||
-a
|
||||
-not
|
||||
-path
|
||||
"./src/python/*"
|
||||
-a
|
||||
\\
|
||||
(-name "*.cpp" -not -name "*.test.cpp" \\)
|
||||
\\) -not -name "CircularFifo.hpp" -not -name
|
||||
"ProducerConsumerQueue.hpp" -not -name "VariableSizeClusterFinder.hpp" |
|
||||
xargs -I {} -n 1 -P 10 bash -c
|
||||
find -path "./src/*" -not -path "./src/python/*" -not -name "*.test.cpp"
|
||||
-not -name "CircularFifo.hpp" -not -name "ProducerConsumerQueue.hpp" -not
|
||||
-name "VariableSizeClusterFinder.hpp" | xargs -I {} -n 1 -P 10 bash -c
|
||||
"${CLANG_TIDY_COMMAND} --config-file=.clang-tidy -p build {}"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "linting with clang-tidy"
|
||||
|
||||
Reference in new issue
Block a user