Use clang-format-9 for Travis CI formatting checks (#736)

This commit is contained in:
James Price
2020-04-15 17:05:00 -04:00
committed by GitHub
parent c19897ff0f
commit da7c1b3498
2 changed files with 9 additions and 1 deletions

View File

@@ -1,7 +1,10 @@
#!/usr/bin/env bash
# Run git-clang-format to check for violations
CLANG_FORMAT_OUTPUT=$(git-clang-format --diff origin/master --extensions c,cpp,h,hpp)
if [ "$TRAVIS" == "true" ]; then
EXTRA_OPTS="--binary `which clang-format-9`"
fi
CLANG_FORMAT_OUTPUT=$(git-clang-format --diff origin/master --extensions c,cpp,h,hpp $EXTRA_OPTS)
# Check for no-ops
grep '^no modified files to format$' <<<"$CLANG_FORMAT_OUTPUT" && exit 0