File tree Expand file tree Collapse file tree 3 files changed +1
-103
lines changed Expand file tree Collapse file tree 3 files changed +1
-103
lines changed Original file line number Diff line number Diff line change @@ -806,18 +806,10 @@ add_custom_target(
806806 VERBATIM
807807)
808808
809- add_custom_target (
810- whitespace-format
811- ${CMAKE_SOURCE_DIR} /tools/whitespace-format.sh
812- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
813- COMMENT "fixing whitespace issues (trailing whitespace, DOS line endings)"
814- VERBATIM
815- )
816-
817809# Add a format target that runs all the formatters.
818810add_custom_target (
819811 format
820- DEPENDS clang-format yapf cmake-format whitespace-format
812+ DEPENDS clang-format yapf cmake-format
821813 COMMENT "formatting all files"
822814)
823815
Original file line number Diff line number Diff line change @@ -123,32 +123,6 @@ else
123123 echo
124124fi
125125
126- # Check for trailing whitespace in staged files.
127- TRAILING_WS=$( git diff-index --cached --diff-filter=ACMR --name-only HEAD | grep -vE " lib/(yamlcpp|Catch2|systemtap)" | grep -vE " \.(gold|test_input)$" | xargs git diff --cached | grep -E ' ^\+.*[[:space:]]$' || true)
128- if [ -n " $TRAILING_WS " ]; then
129- echo " The commit is not accepted because it contains trailing whitespace."
130- echo " The easiest way to fix this is to run:"
131- echo
132- echo " $ cmake --build <build_dir> --target format"
133- exit 1
134- else
135- echo " This commit complies with the trailing whitespace rules."
136- echo
137- fi
138-
139- # Check for DOS carriage returns in staged files.
140- DOS_CR=$( git diff-index --cached --diff-filter=ACMR --name-only HEAD | grep -vE " lib/(yamlcpp|Catch2|systemtap)" | grep -vE " \.test_input$" | xargs git diff --cached | grep -E ' ^\+.*\r$' || true)
141- if [ -n " $DOS_CR " ]; then
142- echo " The commit is not accepted because it contains DOS carriage returns."
143- echo " The easiest way to fix this is to run:"
144- echo
145- echo " $ cmake --build <build_dir> --target format"
146- exit 1
147- else
148- echo " This commit complies with the DOS line ending rules."
149- echo
150- fi
151-
152126# Cleanup before exit
153127rm -f " $clang_patch_file " " $yapf_patch_file "
154128exit 0
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments