Skip to content

Commit d7db470

Browse files
committed
Simplify configuration for clang-format
Instead of using a detailed configuration, use Google base style and add the extras. Signed-off-by: Stefan Weil <[email protected]>
1 parent 544d399 commit d7db470

File tree

1 file changed

+2
-135
lines changed

1 file changed

+2
-135
lines changed

.clang-format

+2-135
Original file line numberDiff line numberDiff line change
@@ -1,137 +1,4 @@
11
---
2-
Language: Cpp
3-
# BasedOnStyle: Google
4-
AccessModifierOffset: -1
5-
AlignAfterOpenBracket: Align
6-
AlignConsecutiveAssignments: false
7-
AlignConsecutiveDeclarations: false
8-
AlignEscapedNewlines: Left
9-
AlignOperands: true
10-
AlignTrailingComments: true
11-
AllowAllParametersOfDeclarationOnNextLine: true
12-
AllowShortBlocksOnASingleLine: false
13-
AllowShortCaseLabelsOnASingleLine: false
14-
AllowShortFunctionsOnASingleLine: All
15-
AllowShortIfStatementsOnASingleLine: true
16-
AllowShortLoopsOnASingleLine: true
17-
AlwaysBreakAfterDefinitionReturnType: None
18-
AlwaysBreakAfterReturnType: None
19-
AlwaysBreakBeforeMultilineStrings: true
20-
AlwaysBreakTemplateDeclarations: true
21-
BinPackArguments: true
22-
BinPackParameters: true
23-
BraceWrapping:
24-
AfterClass: false
25-
AfterControlStatement: false
26-
AfterEnum: false
27-
AfterFunction: false
28-
AfterNamespace: false
29-
AfterObjCDeclaration: false
30-
AfterStruct: false
31-
AfterUnion: false
32-
AfterExternBlock: false
33-
BeforeCatch: false
34-
BeforeElse: false
35-
IndentBraces: false
36-
SplitEmptyFunction: true
37-
SplitEmptyRecord: true
38-
SplitEmptyNamespace: true
39-
BreakBeforeBinaryOperators: None
40-
BreakBeforeBraces: Attach
41-
BreakBeforeInheritanceComma: false
42-
BreakBeforeTernaryOperators: true
43-
BreakConstructorInitializersBeforeComma: false
44-
BreakConstructorInitializers: BeforeColon
45-
BreakAfterJavaFieldAnnotations: false
46-
BreakStringLiterals: true
47-
ColumnLimit: 80
48-
CommentPragmas: '^ IWYU pragma:'
49-
CompactNamespaces: false
50-
ConstructorInitializerAllOnOneLineOrOnePerLine: true
51-
ConstructorInitializerIndentWidth: 4
52-
ContinuationIndentWidth: 4
53-
Cpp11BracedListStyle: true
2+
BasedOnStyle: Google
3+
# Enforce always the same pointer alignment.
544
DerivePointerAlignment: false
55-
DisableFormat: false
56-
ExperimentalAutoDetectBinPacking: false
57-
FixNamespaceComments: true
58-
ForEachMacros:
59-
- foreach
60-
- Q_FOREACH
61-
- BOOST_FOREACH
62-
IncludeBlocks: Preserve
63-
IncludeCategories:
64-
- Regex: '^<ext/.*\.h>'
65-
Priority: 2
66-
- Regex: '^<.*\.h>'
67-
Priority: 1
68-
- Regex: '^<.*'
69-
Priority: 2
70-
- Regex: '.*'
71-
Priority: 3
72-
IncludeIsMainRegex: '([-_](test|unittest))?$'
73-
IndentCaseLabels: true
74-
IndentPPDirectives: None
75-
IndentWidth: 2
76-
IndentWrappedFunctionNames: false
77-
JavaScriptQuotes: Leave
78-
JavaScriptWrapImports: true
79-
KeepEmptyLinesAtTheStartOfBlocks: false
80-
MacroBlockBegin: ''
81-
MacroBlockEnd: ''
82-
MaxEmptyLinesToKeep: 1
83-
NamespaceIndentation: None
84-
ObjCBinPackProtocolList: Never
85-
ObjCBlockIndentWidth: 2
86-
ObjCSpaceAfterProperty: false
87-
ObjCSpaceBeforeProtocolList: true
88-
PenaltyBreakAssignment: 2
89-
PenaltyBreakBeforeFirstCallParameter: 1
90-
PenaltyBreakComment: 300
91-
PenaltyBreakFirstLessLess: 120
92-
PenaltyBreakString: 1000
93-
PenaltyExcessCharacter: 1000000
94-
PenaltyReturnTypeOnItsOwnLine: 200
95-
PointerAlignment: Left
96-
RawStringFormats:
97-
- Language: Cpp
98-
Delimiters:
99-
- cc
100-
- CC
101-
- cpp
102-
- Cpp
103-
- CPP
104-
- 'c++'
105-
- 'C++'
106-
CanonicalDelimiter: ''
107-
BasedOnStyle: google
108-
- Language: TextProto
109-
Delimiters:
110-
- pb
111-
- PB
112-
- proto
113-
- PROTO
114-
CanonicalDelimiter: ''
115-
BasedOnStyle: google
116-
ReflowComments: true
117-
SortIncludes: true
118-
SortUsingDeclarations: true
119-
SpaceAfterCStyleCast: false
120-
SpaceAfterTemplateKeyword: true
121-
SpaceBeforeAssignmentOperators: true
122-
SpaceBeforeCtorInitializerColon: true
123-
SpaceBeforeInheritanceColon: true
124-
SpaceBeforeParens: ControlStatements
125-
SpaceBeforeRangeBasedForLoopColon: true
126-
SpaceInEmptyParentheses: false
127-
SpacesBeforeTrailingComments: 2
128-
SpacesInAngles: false
129-
SpacesInContainerLiterals: true
130-
SpacesInCStyleCastParentheses: false
131-
SpacesInParentheses: false
132-
SpacesInSquareBrackets: false
133-
Standard: Auto
134-
TabWidth: 8
135-
UseTab: Never
136-
...
137-

0 commit comments

Comments
 (0)