.clang-format: tweak C++ style
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 28 Apr 2022 23:18:12 +0000 (19:18 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 13 Jun 2022 20:34:46 +0000 (16:34 -0400)
Don't indent namespaces nor after access modifiers.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: Ifb67843c7c89d1f49dca9f59a76273f3b0b8fb3a

.clang-format

index 91a23c9b0be50b69540fc3604d115bb961528dc9..66b5ef4088dc7e9088f12c8ff4c7f4c298e6558b 100644 (file)
@@ -1,9 +1,11 @@
+AccessModifierOffset: -8
 AlignAfterOpenBracket: DontAlign
 AlignConsecutiveAssignments: false
 AlignConsecutiveDeclarations: false
 AlignEscapedNewlines: Left
 AlignOperands: false
 AlignTrailingComments: false
+AllowAllConstructorInitializersOnNextLine: true
 AllowShortBlocksOnASingleLine: false
 AllowShortCaseLabelsOnASingleLine: false
 AllowShortFunctionsOnASingleLine: None
@@ -11,14 +13,16 @@ AllowShortIfStatementsOnASingleLine: false
 AllowShortLoopsOnASingleLine: false
 AlwaysBreakAfterReturnType: None
 AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: Yes
 BinPackArguments: true
 BinPackParameters: false
 BreakBeforeBraces: Custom
+BreakConstructorInitializers: AfterColon
 BraceWrapping:
   AfterControlStatement: false
   AfterEnum: false
   AfterFunction: true
-  AfterNamespace: true
+  AfterNamespace: false
   AfterStruct: false
   AfterUnion: false
   AfterExternBlock: false
@@ -29,11 +33,15 @@ BraceWrapping:
   SplitEmptyFunction: true
 BreakBeforeBinaryOperators: None
 BreakBeforeTernaryOperators: false
+BreakConstructorInitializers: AfterColon
 BreakStringLiterals: false
-ColumnLimit: 80
+ColumnLimit: 100
+ConstructorInitializerAllOnOneLineOrOnePerLine: true
+ConstructorInitializerIndentWidth: 8
 ContinuationIndentWidth: 16
 DerivePointerAlignment: false
 DisableFormat: false
+EmptyLineBeforeAccessModifier: LogicalBlock
 ForEachMacros:
   - 'cds_lfht_for_each_entry'
   - 'cds_lfht_for_each_entry_safe'
@@ -54,6 +62,7 @@ KeepEmptyLinesAtTheStartOfBlocks: false
 MacroBlockBegin: ''
 MacroBlockEnd: ''
 MaxEmptyLinesToKeep: 1
+NamespaceIndentation: None
 
 # Taken from git's rules
 PenaltyBreakAssignment: 10
@@ -64,6 +73,7 @@ PenaltyExcessCharacter: 100
 PenaltyReturnTypeOnItsOwnLine: 60
 
 PointerAlignment: Right
+ReferenceAlignment: Left
 ReflowComments: true
 SortIncludes: true
 SpaceAfterCStyleCast: true
This page took 0.026536 seconds and 4 git commands to generate.