Update formatting tools to clang-format-10
This commit is contained in:
parent
df3ed43d70
commit
c98cdace6f
@ -62,8 +62,8 @@ matrix:
|
|||||||
- npm ci --ignore-scripts
|
- npm ci --ignore-scripts
|
||||||
script:
|
script:
|
||||||
- ./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
- ./scripts/check_taginfo.py taginfo.json profiles/car.lua
|
||||||
- ${MASON} install clang-format 3.8.1
|
- ${MASON} install clang-format 10.0.0
|
||||||
- PATH=$(${MASON} prefix clang-format 3.8.1)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh
|
- PATH=$(${MASON} prefix clang-format 10.0.0)/bin:${PATH} ./scripts/format.sh && ./scripts/error_on_dirty.sh
|
||||||
- node ./scripts/validate_changelog.js
|
- node ./scripts/validate_changelog.js
|
||||||
# See issue 4043
|
# See issue 4043
|
||||||
#- npm run docs && ./scripts/error_on_dirty.sh
|
#- npm run docs && ./scripts/error_on_dirty.sh
|
||||||
|
|||||||
@ -19,18 +19,18 @@ elif [[ ${OS} = "Darwin" ]] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Discover clang-format
|
# Discover clang-format
|
||||||
if type clang-format-3.8 2> /dev/null ; then
|
if type clang-format-10.0.0 2> /dev/null ; then
|
||||||
CLANG_FORMAT=clang-format-3.8
|
CLANG_FORMAT=clang-format-10.0.0
|
||||||
elif type clang-format 2> /dev/null ; then
|
elif type clang-format 2> /dev/null ; then
|
||||||
# Clang format found, but need to check version
|
# Clang format found, but need to check version
|
||||||
CLANG_FORMAT=clang-format
|
CLANG_FORMAT=clang-format
|
||||||
V=$(clang-format --version)
|
V=$(clang-format --version)
|
||||||
if [[ $V != *3.8* ]] ; then
|
if [[ $V != *10.0* ]] ; then
|
||||||
echo "clang-format is not 3.8 (returned ${V})"
|
echo "clang-format is not 10.0 (returned ${V})"
|
||||||
#exit 1
|
#exit 1
|
||||||
fi
|
fi
|
||||||
else
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user