diff options
author | Brad King <brad.king@kitware.com> | 2023-01-18 17:45:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-18 21:20:02 (GMT) |
commit | 6739d579486b52a76baee238162faa10bd21b38e (patch) | |
tree | 6f875d41585f9da5bea6fca16d8fcc33e7b98e98 | |
parent | 9ee57226bc37129e3c6a2b5cddc60279a105d4c7 (diff) | |
download | CMake-6739d579486b52a76baee238162faa10bd21b38e.zip CMake-6739d579486b52a76baee238162faa10bd21b38e.tar.gz CMake-6739d579486b52a76baee238162faa10bd21b38e.tar.bz2 |
clang-format.bash: update to clang-format-15
The `.clang-format` configuration needs no changes to make the
version 15 format close to what version 6.0 produced before.
Issue: #24315
-rw-r--r-- | .clang-format | 2 | ||||
-rw-r--r-- | .gitattributes | 2 | ||||
-rw-r--r-- | Utilities/.gitattributes | 2 | ||||
-rwxr-xr-x | Utilities/Scripts/clang-format.bash | 8 |
4 files changed, 7 insertions, 7 deletions
diff --git a/.clang-format b/.clang-format index cba23d6..813a84d 100644 --- a/.clang-format +++ b/.clang-format @@ -1,5 +1,5 @@ --- -# This configuration requires clang-format version 6.0 exactly. +# This configuration requires clang-format version 15 exactly. BasedOnStyle: Mozilla AlignOperands: false AllowShortFunctionsOnASingleLine: InlineOnly diff --git a/.gitattributes b/.gitattributes index 43ad3b7..96a1166 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,7 +4,7 @@ .editorconfig export-ignore # Custom attribute to mark sources as using our C code style. -[attr]our-c-style whitespace=tab-in-indent format.clang-format=6.0 +[attr]our-c-style whitespace=tab-in-indent format.clang-format=15 # Custom attribute to mark sources as generated. # Do not perform whitespace checks. Do not format. diff --git a/Utilities/.gitattributes b/Utilities/.gitattributes index f799e88..c43b55d 100644 --- a/Utilities/.gitattributes +++ b/Utilities/.gitattributes @@ -5,4 +5,4 @@ SetupForDevelopment.sh export-ignore # Do not format third-party sources. /KWIML/** -format.clang-format /cm*/** -format.clang-format -/cmcurl/curltest.c format.clang-format=6.0 +/cmcurl/curltest.c format.clang-format=15 diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash index 9b38a5b..27ed40f 100755 --- a/Utilities/Scripts/clang-format.bash +++ b/Utilities/Scripts/clang-format.bash @@ -78,7 +78,7 @@ test "$#" = 0 || die "$usage" # Find a default tool. tools=' - clang-format-6.0 + clang-format-15 clang-format ' if test "x$clang_format" = "x"; then @@ -96,8 +96,8 @@ if ! type -p "$clang_format" >/dev/null; then exit 1 fi -if ! "$clang_format" --version | grep 'clang-format version 6\.0' >/dev/null 2>/dev/null; then - echo "clang-format version 6.0 is required (exactly)" +if ! "$clang_format" --version | grep 'clang-format version 15' >/dev/null 2>/dev/null; then + echo "clang-format version 15 is required (exactly)" exit 1 fi @@ -116,7 +116,7 @@ $git_ls | # Select sources with our attribute. git check-attr --stdin format.clang-format | - sed -n '/: format\.clang-format: \(set\|6\.0\)$/ {s/:[^:]*:[^:]*$//p}' | + sed -n '/: format\.clang-format: \(set\|15\)$/ {s/:[^:]*:[^:]*$//p}' | # Update sources in-place. xargs -d '\n' "$clang_format" -i |