summaryrefslogtreecommitdiff
path: root/.clang-format
diff options
context:
space:
mode:
authorClausKlein <claus.klein@arcormail.de>2021-06-01 21:52:40 +0200
committerClausKlein <claus.klein@arcormail.de>2021-06-01 21:52:40 +0200
commit07fa228d53c104d14b136d6dd6cdb514b4b995f1 (patch)
treed657b59b18b61cd359288e0fcf5e9d478c71bd7f /.clang-format
parent9a26624a2fdad8541d01afaf0dbafb64a8852f69 (diff)
downloadATCD-07fa228d53c104d14b136d6dd6cdb514b4b995f1.tar.gz
add clang-format config file to format code
respect code review comments
Diffstat (limited to '.clang-format')
-rw-r--r--.clang-format38
1 files changed, 38 insertions, 0 deletions
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 00000000000..cdb39325377
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,38 @@
+---
+# This configuration requires clang-format version 12.0 or newer.
+BasedOnStyle: Mozilla
+AlignOperands: false
+AlignConsecutiveDeclarations: Consecutive
+AllowAllParametersOfDeclarationOnNextLine: false
+AllowShortBlocksOnASingleLine: true
+AllowShortFunctionsOnASingleLine: InlineOnly
+BinPackArguments: false
+BinPackParameters: false
+BreakBeforeBraces: Custom
+BraceWrapping:
+ AfterCaseLabel: true
+ AfterClass: true
+ AfterControlStatement: Never
+ AfterEnum: true
+ AfterFunction: true
+ AfterNamespace: true
+ AfterObjCDeclaration: true
+ AfterStruct: true
+ AfterUnion: true
+ AfterExternBlock: true
+ BeforeCatch: true
+ BeforeElse: true
+ BeforeLambdaBody: false
+ BeforeWhile: true
+ IndentBraces: false
+ SplitEmptyFunction: false
+ SplitEmptyRecord: true
+ SplitEmptyNamespace: true
+# based on BreakBeforeBraces: GNU
+ColumnLimit: 79
+#XXX IndentAccessModifiers: true
+IndentPPDirectives: AfterHash
+SortUsingDeclarations: false
+SpaceAfterTemplateKeyword: true
+SpaceBeforeParens: Always
+...