Update clang-format in Travis

AllowShortBlocksOnASingleLine: Empty was added in clang-format 10
parent 7722583d
...@@ -31,7 +31,7 @@ _apt_pkgs: &_apt_pkgs ...@@ -31,7 +31,7 @@ _apt_pkgs: &_apt_pkgs
- 'gdb' - 'gdb'
- 'lcov' - 'lcov'
- 'cppcheck' - 'cppcheck'
- 'clang-format-9' - 'clang-format-10'
- 'python3-pip' - 'python3-pip'
- 'python3-setuptools' - 'python3-setuptools'
- 'ninja-build' - 'ninja-build'
...@@ -227,7 +227,7 @@ jobs: ...@@ -227,7 +227,7 @@ jobs:
before_install: before_install:
# Check source code formatting # 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 [ $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 - 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: 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