[Cmake-commits] CMake branch, master, updated. v3.11.2-796-g68be361
Kitware Robot
kwrobot at kitware.com
Fri May 18 11:15:05 EDT 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 68be3618dc4cf444b6514a0797fde68c664b902f (commit)
via 8cfc45f6bd91b258eccf058913df1490ae2face6 (commit)
from 4eea43fce72c0b9a08492b38c240f4c036e72a6d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68be3618dc4cf444b6514a0797fde68c664b902f
commit 68be3618dc4cf444b6514a0797fde68c664b902f
Merge: 4eea43f 8cfc45f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri May 18 15:10:33 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri May 18 11:10:53 2018 -0400
Merge topic 'clang-format-version'
8cfc45f6bd clang-format: Explicitly require version 3.8 of the tool
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2086
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8cfc45f6bd91b258eccf058913df1490ae2face6
commit 8cfc45f6bd91b258eccf058913df1490ae2face6
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu May 17 09:57:49 2018 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri May 18 09:19:10 2018 -0400
clang-format: Explicitly require version 3.8 of the tool
Versions of clang-format newer than 3.8 produce different output.
Our source code guide says that version 3.8 exactly must be used.
Update the comment in our `.clang-format` config file accordingly.
Add a check to our formatting script to verify the version.
Also update its tool search to look for the explicitly-named
3.8 variant first.
diff --git a/.clang-format b/.clang-format
index 88bfbd3..c0b5cc3 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,5 +1,5 @@
---
-# This configuration requires clang-format 3.8 or higher.
+# This configuration requires clang-format version 3.8 exactly.
BasedOnStyle: Mozilla
AlignOperands: false
AlwaysBreakAfterReturnType: None
diff --git a/Utilities/Scripts/clang-format.bash b/Utilities/Scripts/clang-format.bash
index 3b331a1..4c6225d 100755
--- a/Utilities/Scripts/clang-format.bash
+++ b/Utilities/Scripts/clang-format.bash
@@ -78,8 +78,8 @@ test "$#" = 0 || die "$usage"
# Find a default tool.
tools='
- clang-format
clang-format-3.8
+ clang-format
'
if test "x$clang_format" = "x"; then
for tool in $tools; do
@@ -96,6 +96,11 @@ if ! type -p "$clang_format" >/dev/null; then
exit 1
fi
+if ! "$clang_format" --version | grep 'clang-format version 3\.8' >/dev/null 2>/dev/null; then
+ echo "clang-format version 3.8 is required (exactly)"
+ exit 1
+fi
+
# Select listing mode.
case "$mode" in
'') echo "$usage"; exit 0 ;;
-----------------------------------------------------------------------
Summary of changes:
.clang-format | 2 +-
Utilities/Scripts/clang-format.bash | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list