From c98cdace6f19bd5ddd09bde0faf9f51e9df089fd Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Tue, 24 Nov 2020 09:42:00 -0800 Subject: [PATCH] Update formatting tools to clang-format-10 --- .travis.yml | 4 ++-- scripts/format.sh | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8a62697ae..44b6e9c89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,8 +62,8 @@ matrix: - npm ci --ignore-scripts script: - ./scripts/check_taginfo.py taginfo.json profiles/car.lua - - ${MASON} install clang-format 3.8.1 - - PATH=$(${MASON} prefix clang-format 3.8.1)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh + - ${MASON} install clang-format 10.0.0 + - PATH=$(${MASON} prefix clang-format 10.0.0)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh - node ./scripts/validate_changelog.js # See issue 4043 #- npm run docs && ./scripts/error_on_dirty.sh diff --git a/scripts/format.sh b/scripts/format.sh index 6b14688dc..cd462756d 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -19,18 +19,18 @@ elif [[ ${OS} = "Darwin" ]] ; then fi # Discover clang-format -if type clang-format-3.8 2> /dev/null ; then - CLANG_FORMAT=clang-format-3.8 +if type clang-format-10.0.0 2> /dev/null ; then + CLANG_FORMAT=clang-format-10.0.0 elif type clang-format 2> /dev/null ; then # Clang format found, but need to check version CLANG_FORMAT=clang-format V=$(clang-format --version) - if [[ $V != *3.8* ]] ; then - echo "clang-format is not 3.8 (returned ${V})" + if [[ $V != *10.0* ]] ; then + echo "clang-format is not 10.0 (returned ${V})" #exit 1 fi else - echo "No appropriate clang-format found (expected clang-format-3.8, or clang-format)" + echo "No appropriate clang-format found (expected clang-format-10.0.0, or clang-format)" exit 1 fi