summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-05-31 13:40:34 -0400
committerBrad King <brad.king@kitware.com>2018-06-01 09:52:02 -0400
commit523c443d135f6474cf5a9d0372b3cc364fc7ebe5 (patch)
tree82f22000589d6ded60d2c325b221c5290cda3d3d /.clang-format
parenteb7ec19c1c639e91b812763ead3a56e97d20aec4 (diff)
downloadcmake-523c443d135f6474cf5a9d0372b3cc364fc7ebe5.tar.gz
clang-format.bash: update to clang-format-6.0
Update `.clang-format` with configuration to make the 6.0 format as close as possible to what 3.8 produced before. Then revise the style: * Indent preprocessor directives (a feature new since 3.8) * Add a newline and indentation before inheritance `:` and `,` Rename the Git attribute identifying the format to include the clang-format version number: `format.clang-format-6.0`. This will aid external infrastructure in knowing what version of the tool to run.
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format17
1 files changed, 15 insertions, 2 deletions
diff --git a/.clang-format b/.clang-format
index c0b5cc34b2..162c56d763 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,8 +1,21 @@
---
-# This configuration requires clang-format version 3.8 exactly.
+# This configuration requires clang-format version 6.0 exactly.
BasedOnStyle: Mozilla
AlignOperands: false
-AlwaysBreakAfterReturnType: None
+AllowShortFunctionsOnASingleLine: InlineOnly
AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+BinPackArguments: true
+BinPackParameters: true
+BraceWrapping:
+ AfterClass: true
+ AfterEnum: true
+ AfterFunction: true
+ AfterStruct: true
+ AfterUnion: true
+BreakBeforeBraces: Custom
ColumnLimit: 79
+IndentPPDirectives: AfterHash
+SortUsingDeclarations: false
+SpaceAfterTemplateKeyword: true
...