Unverified Commit 5b5e374d authored by Kip's avatar Kip Committed by GitHub

Merge pull request #899 from Tachi107/travis-update-clang-format

Update clang-format in Travis
parents 7722583d b4b63b9a
......@@ -31,7 +31,7 @@ _apt_pkgs: &_apt_pkgs
- 'gdb'
- 'lcov'
- 'cppcheck'
- 'clang-format-9'
- 'clang-format-10'
- 'python3-pip'
- 'python3-setuptools'
- 'ninja-build'
......@@ -227,7 +227,7 @@ 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) --diff master HEAD -- $changed_src > ./clang-format-diff; fi
- if [ ! -z "$changed_src" ]; then git-clang-format-10 --quiet --binary $(which clang-format-10) --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:
......
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