Commit 7bb44b17 authored by Mathieu Stefani's avatar Mathieu Stefani

Travis: Update code format check

parent a35624d5
......@@ -227,8 +227,8 @@ jobs:
before_install:
# Check source code formatting
- if [ $TRAVIS_PULL_REQUEST != "false" ]; then changed_src=$(git diff --name-only master...HEAD | egrep "\.(h|cc)$" | grep -v "include/pistache/thirdparty" || [ $? == 1 ]); fi
- if [ ! -z "$changed_src" ]; then git-clang-format-9 --quiet --binary $(which clang-format-9) --style llvm --diff master HEAD -- $changed_src > ./clang-format-diff; fi
- if [ -s ./clang-format-diff ]; then cat ./clang-format-diff && echo "Format source code according to LLVM style, please" && false; fi
- if [ ! -z "$changed_src" ]; then git-clang-format-9 --quiet --binary $(which clang-format-9) --diff master HEAD -- $changed_src > ./clang-format-diff; fi
- if [ -s ./clang-format-diff ]; then cat ./clang-format-diff && echo "Format source code according to .clang-format rules. Make sure to run make format" && false; fi
install:
- DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment