Skip to content

Commit 9dbfa78

Browse files
committed
refine .clang-format based on Google style
1 parent ea89b78 commit 9dbfa78

File tree

1 file changed

+7
-142
lines changed

1 file changed

+7
-142
lines changed

.clang-format

+7-142
Original file line numberDiff line numberDiff line change
@@ -1,147 +1,12 @@
11
---
2-
Language: Cpp
2+
Language: Cpp
3+
BasedOnStyle: Google
34
AccessModifierOffset: -3
4-
AlignAfterOpenBracket: Align
5-
AlignConsecutiveMacros: true
6-
AlignConsecutiveAssignments: false
7-
AlignConsecutiveBitFields: false
8-
AlignConsecutiveDeclarations: false
9-
AlignEscapedNewlines: Right
10-
AlignOperands: Align
11-
AlignTrailingComments: true
12-
AllowAllArgumentsOnNextLine: true
13-
AllowAllConstructorInitializersOnNextLine: true
14-
AllowAllParametersOfDeclarationOnNextLine: true
15-
AllowShortEnumsOnASingleLine: true
16-
AllowShortBlocksOnASingleLine: Never
17-
AllowShortCaseLabelsOnASingleLine: false
18-
AllowShortFunctionsOnASingleLine: All
19-
AllowShortLambdasOnASingleLine: All
20-
AllowShortIfStatementsOnASingleLine: Never
21-
AllowShortLoopsOnASingleLine: false
22-
AlwaysBreakAfterDefinitionReturnType: None
23-
AlwaysBreakAfterReturnType: None
24-
AlwaysBreakBeforeMultilineStrings: false
25-
AlwaysBreakTemplateDeclarations: MultiLine
26-
BinPackArguments: true
27-
BinPackParameters: true
28-
BraceWrapping:
29-
AfterCaseLabel: false
30-
AfterClass: false
31-
AfterControlStatement: Never
32-
AfterEnum: false
33-
AfterFunction: false
34-
AfterNamespace: false
35-
AfterObjCDeclaration: false
36-
AfterStruct: false
37-
AfterUnion: false
38-
AfterExternBlock: false
39-
BeforeCatch: false
40-
BeforeElse: false
41-
BeforeLambdaBody: false
42-
BeforeWhile: false
43-
IndentBraces: false
44-
SplitEmptyFunction: true
45-
SplitEmptyRecord: true
46-
SplitEmptyNamespace: true
47-
BreakBeforeBinaryOperators: None
48-
BreakBeforeBraces: Attach
49-
BreakBeforeInheritanceComma: false
50-
BreakInheritanceList: BeforeColon
51-
BreakBeforeTernaryOperators: true
52-
BreakConstructorInitializersBeforeComma: false
53-
BreakConstructorInitializers: BeforeColon
54-
BreakAfterJavaFieldAnnotations: false
55-
BreakStringLiterals: true
56-
ColumnLimit: 80
57-
CommentPragmas: '^ IWYU pragma:'
58-
CompactNamespaces: false
59-
ConstructorInitializerAllOnOneLineOrOnePerLine: false
60-
ConstructorInitializerIndentWidth: 4
61-
ContinuationIndentWidth: 4
62-
Cpp11BracedListStyle: true
63-
DeriveLineEnding: true
645
DerivePointerAlignment: false
65-
DisableFormat: false
66-
ExperimentalAutoDetectBinPacking: false
67-
FixNamespaceComments: true
68-
ForEachMacros:
69-
- foreach
70-
- Q_FOREACH
71-
- BOOST_FOREACH
72-
IncludeBlocks: Preserve
73-
IncludeCategories:
74-
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
75-
Priority: 2
76-
SortPriority: 0
77-
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
78-
Priority: 3
79-
SortPriority: 0
80-
- Regex: '.*'
81-
Priority: 1
82-
SortPriority: 0
83-
IncludeIsMainRegex: '(Test)?$'
84-
IncludeIsMainSourceRegex: ''
85-
IndentCaseLabels: false
86-
IndentCaseBlocks: false
87-
IndentGotoLabels: true
88-
IndentPPDirectives: None
89-
IndentExternBlock: AfterExternBlock
906
IndentWidth: 4
91-
IndentWrappedFunctionNames: false
92-
InsertTrailingCommas: None
93-
JavaScriptQuotes: Leave
94-
JavaScriptWrapImports: true
95-
KeepEmptyLinesAtTheStartOfBlocks: true
96-
MacroBlockBegin: ''
97-
MacroBlockEnd: ''
98-
MaxEmptyLinesToKeep: 2
99-
NamespaceIndentation: None
100-
ObjCBinPackProtocolList: Auto
101-
ObjCBlockIndentWidth: 2
102-
ObjCBreakBeforeNestedBlockParam: true
103-
ObjCSpaceAfterProperty: false
104-
ObjCSpaceBeforeProtocolList: true
105-
PenaltyBreakAssignment: 2
106-
PenaltyBreakBeforeFirstCallParameter: 19
107-
PenaltyBreakComment: 300
108-
PenaltyBreakFirstLessLess: 120
109-
PenaltyBreakString: 1000
110-
PenaltyBreakTemplateDeclaration: 10
111-
PenaltyExcessCharacter: 1000000
112-
PenaltyReturnTypeOnItsOwnLine: 60
113-
PointerAlignment: Right
114-
ReflowComments: true
115-
SortIncludes: false
116-
SortUsingDeclarations: true
117-
SpaceAfterCStyleCast: false
118-
SpaceAfterLogicalNot: false
119-
SpaceAfterTemplateKeyword: true
120-
SpaceBeforeAssignmentOperators: true
121-
SpaceBeforeCpp11BracedList: false
122-
SpaceBeforeCtorInitializerColon: true
123-
SpaceBeforeInheritanceColon: true
124-
SpaceBeforeParens: ControlStatements
125-
SpaceBeforeRangeBasedForLoopColon: true
126-
SpaceInEmptyBlock: false
127-
SpaceInEmptyParentheses: false
128-
SpacesBeforeTrailingComments: 2
129-
SpacesInAngles: false
130-
SpacesInConditionalStatement: false
131-
SpacesInContainerLiterals: true
132-
SpacesInCStyleCastParentheses: false
133-
SpacesInParentheses: false
134-
SpacesInSquareBrackets: false
135-
SpaceBeforeSquareBrackets: false
136-
Standard: Cpp11
137-
StatementMacros:
138-
- Q_UNUSED
139-
- QT_REQUIRE_VERSION
140-
TabWidth: 4
141-
UseCRLF: false
142-
UseTab: Never
143-
WhitespaceSensitiveMacros:
144-
- STRINGIZE
145-
- PP_STRINGIZE
146-
- BOOST_PP_STRINGIZE
7+
---
8+
Language: Proto
9+
BasedOnStyle: Google
10+
IndentWidth: 4
11+
ColumnLimit: 120
14712
...

0 commit comments

Comments
 (0)