Use clang-format from CI base image

This commit is contained in:
Siarhei Fedartsou 2022-10-04 18:02:23 +02:00
parent 58817e34b0
commit 43efd0767f

View File

@ -19,18 +19,18 @@ elif [[ ${OS} = "Darwin" ]] ; then
fi fi
# Discover clang-format # Discover clang-format
if type clang-format-14 2> /dev/null ; then if type clang-format-11 2> /dev/null ; then
CLANG_FORMAT=clang-format-14 CLANG_FORMAT=clang-format-11
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 != *14.0* ]] ; then if [[ $V != *11.0* ]] ; then
echo "clang-format is not 14.0 (returned ${V})" echo "clang-format is not 11.0 (returned ${V})"
#exit 1 #exit 1
fi fi
else else
echo "No appropriate clang-format found (expected clang-format-14, or clang-format)" echo "No appropriate clang-format found (expected clang-format-11, or clang-format)"
exit 1 exit 1
fi fi