Skip to content

Commit df3b086

Browse files
committed
style: CI format update
1 parent 1e27503 commit df3b086

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

.clang-format

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,18 @@
1-
# clang-format configuration file based on the version 3.8
2-
# releases.llvm.org/3.8.0/tools/clang/docs/ClangFormatStyleOptions.html
3-
#BasedOnStyle (desactivated since we want to control everything [BC])
41
AccessModifierOffset: -4
52
AlignAfterOpenBracket: DontAlign
63
AlignConsecutiveAssignments: false
74
AlignConsecutiveDeclarations: false
8-
# If AlignEscapedNewlinesLeft is false, that put as far right as possible,
9-
# else left. In newer clang-format version,
10-
#use AlignEscapedNewlines: Right instead.
11-
AlignEscapedNewlinesLeft: false
5+
AlignEscapedNewlines: Right
126
AlignOperands: true
137
AlignTrailingComments: false
8+
AllowAllArgumentsOnNextLine: true
149
AllowAllParametersOfDeclarationOnNextLine: true
15-
AllowShortBlocksOnASingleLine: true
10+
AllowShortBlocksOnASingleLine: Empty
1611
AllowShortCaseLabelsOnASingleLine: false
17-
AllowShortFunctionsOnASingleLine: Empty # pb with 3.5
18-
AllowShortIfStatementsOnASingleLine: false
12+
AllowShortFunctionsOnASingleLine: Empty
13+
AllowShortIfStatementsOnASingleLine: Never
14+
AllowShortLambdasOnASingleLine: Empty
1915
AllowShortLoopsOnASingleLine: false
20-
#AlwaysBreakAfterDefinitionReturnType (not set because deprecated [BC])
2116
AlwaysBreakAfterReturnType: None
2217
AlwaysBreakBeforeMultilineStrings: false
2318
AlwaysBreakTemplateDeclarations: true
@@ -35,30 +30,28 @@ BraceWrapping:
3530
BeforeCatch: true
3631
BeforeElse: true
3732
IndentBraces: false
38-
#SplitEmptyFunctionBody: false (this option provokes a clang-format error [BC])
39-
BreakBeforeBinaryOperators: NonAssignment # pb with 3.5
40-
BreakBeforeBraces: Custom # pb with 3.5
41-
#BreakBeforeInheritanceComma: false (this option needs a newer clang version)
33+
BreakBeforeBinaryOperators: NonAssignment
34+
BreakBeforeBraces: Custom
4235
BreakBeforeTernaryOperators: true
43-
# For newer clang version, consider the new macro:
44-
# BreakConstructorInitializers
45-
BreakConstructorInitializersBeforeComma: false
36+
BreakConstructorInitializers: BeforeColon
37+
BreakInheritanceList: BeforeColon
4638
#BreakStringLiterals
4739
ColumnLimit: 80
4840
CommentPragmas: ''
49-
#CompactNamespaces: false (this option is in newer clang version)
41+
CompactNamespaces: false
5042
ConstructorInitializerAllOnOneLineOrOnePerLine: true
5143
ConstructorInitializerIndentWidth: 4
5244
ContinuationIndentWidth: 4
5345
Cpp11BracedListStyle: false
5446
DerivePointerAlignment: true
5547
DisableFormat: false
5648
#ExperimentalAutoDetectBinPacking (Not defined since the documentation to not use it)
57-
#FixNamespaceComments: false (this option needs a newer clang version)
49+
FixNamespaceComments: true
5850
#ForEachMacros: TODO
5951
#IncludeCategories: TODO
6052
#IncludeIsMainRegex (this option needs a newer clang version)
61-
IndentCaseLabels: false
53+
IndentCaseLabels: true
54+
IndentPPDirectives: AfterHash
6255
IndentWidth: 4
6356
IndentWrappedFunctionNames: true
6457
KeepEmptyLinesAtTheStartOfBlocks: false
@@ -75,12 +68,17 @@ NamespaceIndentation: All
7568
#PenaltyReturnTypeOnItsOwnLine TODO
7669
PointerAlignment: Left
7770
ReflowComments: true # TODO check if 3.5 or 3.8
78-
#SortIncludes (this option needs a newer clang version)
79-
#SortUsingDeclarations (this option needs a newer clang version)
71+
SortIncludes: true
72+
SortUsingDeclarations: true
8073
SpaceAfterCStyleCast: true
81-
#SpaceAfterTemplateKeyword: false (this option needs a newer clang version)
74+
SpaceAfterLogicalNot: false
75+
SpaceAfterTemplateKeyword: true
8276
SpaceBeforeAssignmentOperators: true
77+
SpaceBeforeCpp11BracedList: false
78+
SpaceBeforeCtorInitializerColon: true
79+
SpaceBeforeInheritanceColon: true
8380
SpaceBeforeParens: Never
81+
SpaceBeforeSquareBrackets: false
8482
SpaceInEmptyParentheses: false
8583
SpacesBeforeTrailingComments: 1
8684
SpacesInAngles: true

0 commit comments

Comments
 (0)