summaryrefslogtreecommitdiff
path: root/Meta/lint-clang-format.sh
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2022-02-06 21:05:35 +0200
committerLinus Groh <mail@linusgroh.de>2022-04-01 21:24:45 +0100
commit852ae6c1951b64f5ce0117170011f1242b5931e0 (patch)
tree6aab9040c9e691f2ed47c6859c7432fb6a29d1ad /Meta/lint-clang-format.sh
parented9ddf79ffbf3190c39f19e0387c4a82b1580fa8 (diff)
downloadserenity-852ae6c1951b64f5ce0117170011f1242b5931e0.zip
Meta: Switch to clang-format-14 as the standard formatter
Now that clang-format-14 ubuntu packages are available, it's time to finally upgrade our clang-format version. This version brings with it a bunch of useful features with const-placement being the most notable. These will be enabled in the following commits.
Diffstat (limited to 'Meta/lint-clang-format.sh')
-rwxr-xr-xMeta/lint-clang-format.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/Meta/lint-clang-format.sh b/Meta/lint-clang-format.sh
index 09fbdf12e5..639a58ff49 100755
--- a/Meta/lint-clang-format.sh
+++ b/Meta/lint-clang-format.sh
@@ -27,17 +27,17 @@ fi
if (( ${#files[@]} )); then
CLANG_FORMAT=false
- if command -v clang-format-11 >/dev/null 2>&1 ; then
- CLANG_FORMAT=clang-format-11
+ if command -v clang-format-14 >/dev/null 2>&1 ; then
+ CLANG_FORMAT=clang-format-14
elif command -v clang-format >/dev/null 2>&1 ; then
CLANG_FORMAT=clang-format
- if ! "${CLANG_FORMAT}" --version | awk '{ if (substr($NF, 1, index($NF, ".") - 1) < 11) exit 1; }'; then
- echo "You are using '$("${CLANG_FORMAT}" --version)', which appears to not be clang-format 11 or later."
+ if ! "${CLANG_FORMAT}" --version | awk '{ if (substr($NF, 1, index($NF, ".") - 1) < 14) exit 1; }'; then
+ echo "You are using '$("${CLANG_FORMAT}" --version)', which appears to not be clang-format 14 or later."
echo "It is very likely that the resulting changes are not what you wanted."
fi
else
- echo "clang-format-11 is not available, but C or C++ files need linting! Either skip this script, or install clang-format-11."
- echo "(If you install a package 'clang-format', please make sure it's version 11 or later.)"
+ echo "clang-format-14 is not available, but C or C++ files need linting! Either skip this script, or install clang-format-14."
+ echo "(If you install a package 'clang-format', please make sure it's version 14 or later.)"
exit 1
fi