mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
Meta: Warn before attempting to use clang-format 19
The clang-format version released with llvm 19 will format many files differently than clang-format-18. This change presents the existing warning shown for incorrect clang-format versions to those with versions greater than 18. Fixes issue #1750
This commit is contained in:
parent
10a2cc3781
commit
8f45f59df3
Notes:
github-actions[bot]
2024-10-14 21:55:58 +00:00
Author: https://github.com/jdmnd Commit: https://github.com/LadybirdBrowser/ladybird/commit/8f45f59df3e Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1753 Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 3 additions and 3 deletions
|
@ -39,13 +39,13 @@ if (( ${#files[@]} )); then
|
|||
CLANG_FORMAT=$TOOLCHAIN_DIR/clang-format
|
||||
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) < 18) exit 1; }'; then
|
||||
echo "You are using '$("${CLANG_FORMAT}" --version)', which appears to not be clang-format 18 or later."
|
||||
if ! "${CLANG_FORMAT}" --version | awk '{ if (substr($NF, 1, index($NF, ".") - 1) != 18) exit 1; }'; then
|
||||
echo "You are using '$("${CLANG_FORMAT}" --version)', which appears to not be clang-format 18."
|
||||
echo "It is very likely that the resulting changes are not what you wanted."
|
||||
fi
|
||||
else
|
||||
echo "clang-format-18 is not available, but C or C++ files need linting! Either skip this script, or install clang-format-18."
|
||||
echo "(If you install a package 'clang-format', please make sure it's version 18 or later.)"
|
||||
echo "(If you install a package 'clang-format', please make sure it's version 18.)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue