Run clang-format with make check
This commit is contained in:
parent
a8f5fa5f5a
commit
f912430cda
2
.gitignore
vendored
2
.gitignore
vendored
@ -33,3 +33,5 @@ stamp-h1
|
||||
*.exe
|
||||
.idea
|
||||
cmake-build-debug/
|
||||
*.log
|
||||
*.trs
|
@ -29,4 +29,4 @@ script:
|
||||
- if [ "$JANSSON_BUILD_METHOD" = "cmake" ]; then mkdir build && cd build && cmake $JANSSON_CMAKE_OPTIONS .. && cmake --build . && ctest --output-on-failure; fi
|
||||
- if [ "$JANSSON_BUILD_METHOD" = "coverage" ]; then mkdir build && cd build && cmake $JANSSON_CMAKE_OPTIONS .. && cmake --build . && cmake --build . --target coveralls; fi
|
||||
- if [ "$JANSSON_BUILD_METHOD" = "fuzzer" ]; then ./test/ossfuzz/travisoss.sh; fi
|
||||
- if [ "$JANSSON_BUILD_METHOD" = "lint" ]; then ./scripts/clang-format-ci 9; fi
|
||||
- if [ "$JANSSON_BUILD_METHOD" = "lint" ]; then ./scripts/clang-format-check 9; fi
|
||||
|
@ -8,3 +8,5 @@ dvi:
|
||||
|
||||
pkgconfigdir = $(libdir)/pkgconfig
|
||||
pkgconfig_DATA = jansson.pc
|
||||
|
||||
TESTS = scripts/clang-format-check
|
||||
|
@ -5,6 +5,12 @@ if [ -n "$1" ]; then
|
||||
clangformat="clang-format-$1"
|
||||
fi
|
||||
|
||||
if ! type $clangformat >/dev/null; then
|
||||
# clang-format not found. If running tests, mark this test as
|
||||
# skipped.
|
||||
exit 77
|
||||
fi
|
||||
|
||||
errors=0
|
||||
paths=$(find . -type f -a '(' -name '*.c' -o -name '*.h' ')')
|
||||
for path in $paths; do
|
4
test/.gitignore
vendored
4
test/.gitignore
vendored
@ -18,7 +18,3 @@ suites/api/test_simple
|
||||
suites/api/test_sprintf
|
||||
suites/api/test_unpack
|
||||
suites/api/test_version
|
||||
run-suites.log
|
||||
run-suites.trs
|
||||
test-suite.log
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user