1- #  Google C/C++ Code Style settings
2- #  https://clang.llvm.org/docs/ClangFormatStyleOptions.html
3- #  Author: Kehan Xue, kehan.xue (at) gmail.com
4- 
5- Language : Cpp 
6- BasedOnStyle : Google 
1+ ---
2+ Language :        Cpp 
3+ #  BasedOnStyle:  Google
74AccessModifierOffset : -1 
85AlignAfterOpenBracket : Align 
9- AlignConsecutiveAssignments : None 
10- AlignOperands : Align 
6+ AlignArrayOfStructures : None 
7+ AlignConsecutiveAssignments :
8+   Enabled :         false 
9+   AcrossEmptyLines : false 
10+   AcrossComments :  false 
11+   AlignCompound :   false 
12+   AlignFunctionPointers : false 
13+   PadOperators :    true 
14+ AlignConsecutiveBitFields :
15+   Enabled :         false 
16+   AcrossEmptyLines : false 
17+   AcrossComments :  false 
18+   AlignCompound :   false 
19+   AlignFunctionPointers : false 
20+   PadOperators :    false 
21+ AlignConsecutiveDeclarations :
22+   Enabled :         false 
23+   AcrossEmptyLines : false 
24+   AcrossComments :  false 
25+   AlignCompound :   false 
26+   AlignFunctionPointers : false 
27+   PadOperators :    false 
28+ AlignConsecutiveMacros :
29+   Enabled :         false 
30+   AcrossEmptyLines : false 
31+   AcrossComments :  false 
32+   AlignCompound :   false 
33+   AlignFunctionPointers : false 
34+   PadOperators :    false 
35+ AlignConsecutiveShortCaseStatements :
36+   Enabled :         false 
37+   AcrossEmptyLines : false 
38+   AcrossComments :  false 
39+   AlignCaseColons : false 
40+ AlignEscapedNewlines : Left 
41+ AlignOperands :   Align 
42+ AlignTrailingComments :
43+   Kind :            Always 
44+   OverEmptyLines :  0 
1145AllowAllArgumentsOnNextLine : true 
12- AllowAllConstructorInitializersOnNextLine : true 
13- AllowAllParametersOfDeclarationOnNextLine :  false 
14- AllowShortBlocksOnASingleLine : Empty 
46+ AllowAllParametersOfDeclarationOnNextLine : true 
47+ AllowBreakBeforeNoexceptSpecifier :  Never 
48+ AllowShortBlocksOnASingleLine : Never 
1549AllowShortCaseLabelsOnASingleLine : false 
16- AllowShortFunctionsOnASingleLine : Inline 
17- AllowShortIfStatementsOnASingleLine : Never   #  To avoid conflict, set this "Never" and each "if statement" should include brace when coding
18- AllowShortLambdasOnASingleLine : Inline 
19- AllowShortLoopsOnASingleLine : false 
50+ AllowShortCompoundRequirementOnASingleLine : true 
51+ AllowShortEnumsOnASingleLine : true 
52+ AllowShortFunctionsOnASingleLine : All 
53+ AllowShortIfStatementsOnASingleLine : WithoutElse 
54+ AllowShortLambdasOnASingleLine : All 
55+ AllowShortLoopsOnASingleLine : true 
56+ AlwaysBreakAfterDefinitionReturnType : None 
2057AlwaysBreakAfterReturnType : None 
58+ AlwaysBreakBeforeMultilineStrings : true 
2159AlwaysBreakTemplateDeclarations : Yes 
60+ AttributeMacros :
61+   - __capability 
2262BinPackArguments : true 
23- BreakBeforeBraces : Custom 
63+ BinPackParameters : true 
64+ BitFieldColonSpacing : Both 
2465BraceWrapping :
25-   AfterCaseLabel : false 
26-   AfterClass : false 
27-   AfterStruct : false 
66+   AfterCaseLabel :  false 
67+   AfterClass :      false 
2868  AfterControlStatement : Never 
29-   AfterEnum : false 
30-   AfterFunction : false 
31-   AfterNamespace : false 
32-   AfterUnion : false 
69+   AfterEnum :       false 
3370  AfterExternBlock : false 
34-   BeforeCatch : false 
35-   BeforeElse : false 
71+   AfterFunction :   false 
72+   AfterNamespace :  false 
73+   AfterObjCDeclaration : false 
74+   AfterStruct :     false 
75+   AfterUnion :      false 
76+   BeforeCatch :     false 
77+   BeforeElse :      false 
3678  BeforeLambdaBody : false 
37-   IndentBraces : false 
38-   SplitEmptyFunction : false 
39-   SplitEmptyRecord : false 
40-   SplitEmptyNamespace : false 
79+   BeforeWhile :     false 
80+   IndentBraces :    false 
81+   SplitEmptyFunction : true 
82+   SplitEmptyRecord : true 
83+   SplitEmptyNamespace : true 
84+ BreakAdjacentStringLiterals : true 
85+ BreakAfterAttributes : Leave 
86+ BreakAfterJavaFieldAnnotations : false 
87+ BreakArrays :     true 
4188BreakBeforeBinaryOperators : None 
89+ BreakBeforeConceptDeclarations : Always 
90+ BreakBeforeBraces : Attach 
91+ BreakBeforeInlineASMColon : OnlyMultiline 
4292BreakBeforeTernaryOperators : true 
4393BreakConstructorInitializers : BeforeColon 
4494BreakInheritanceList : BeforeColon 
45- ColumnLimit : 80 
95+ BreakStringLiterals : true 
96+ ColumnLimit :     80 
97+ CommentPragmas :  ' ^ IWYU pragma:' 
4698CompactNamespaces : false 
99+ ConstructorInitializerIndentWidth : 4 
47100ContinuationIndentWidth : 4 
48101Cpp11BracedListStyle : true 
49- DerivePointerAlignment : false   #  Make sure the * or & align on the left
102+ DerivePointerAlignment : true 
103+ DisableFormat :   false 
104+ EmptyLineAfterAccessModifier : Never 
50105EmptyLineBeforeAccessModifier : LogicalBlock 
106+ ExperimentalAutoDetectBinPacking : false 
51107FixNamespaceComments : true 
52- IncludeBlocks : Preserve 
108+ ForEachMacros :
109+   - foreach 
110+   - Q_FOREACH 
111+   - BOOST_FOREACH 
112+ IfMacros :
113+   - KJ_IF_MAYBE 
114+ IncludeBlocks :   Regroup 
115+ IncludeCategories :
116+   - Regex :           ' ^<ext/.*\.h>' 
117+     Priority :        2 
118+     SortPriority :    0 
119+     CaseSensitive :   false 
120+   - Regex :           ' ^<.*\.h>' 
121+     Priority :        1 
122+     SortPriority :    0 
123+     CaseSensitive :   false 
124+   - Regex :           ' ^<.*' 
125+     Priority :        2 
126+     SortPriority :    0 
127+     CaseSensitive :   false 
128+   - Regex :           ' .*' 
129+     Priority :        3 
130+     SortPriority :    0 
131+     CaseSensitive :   false 
132+ IncludeIsMainRegex : ' ([-_](test|unittest))?$' 
133+ IncludeIsMainSourceRegex : ' ' 
134+ IndentAccessModifiers : false 
135+ IndentCaseBlocks : false 
53136IndentCaseLabels : true 
137+ IndentExternBlock : AfterExternBlock 
138+ IndentGotoLabels : true 
54139IndentPPDirectives : None 
55- IndentWidth : 2 
56- KeepEmptyLinesAtTheStartOfBlocks : true 
140+ IndentRequiresClause : true 
141+ IndentWidth :     8 
142+ IndentWrappedFunctionNames : false 
143+ InsertBraces :    false 
144+ InsertNewlineAtEOF : false 
145+ InsertTrailingCommas : None 
146+ IntegerLiteralSeparator :
147+   Binary :          0 
148+   BinaryMinDigits : 0 
149+   Decimal :         0 
150+   DecimalMinDigits : 0 
151+   Hex :             0 
152+   HexMinDigits :    0 
153+ JavaScriptQuotes : Leave 
154+ JavaScriptWrapImports : true 
155+ KeepEmptyLinesAtTheStartOfBlocks : false 
156+ KeepEmptyLinesAtEOF : false 
157+ LambdaBodyIndentation : Signature 
158+ LineEnding :      DeriveLF 
159+ MacroBlockBegin : ' ' 
160+ MacroBlockEnd :   ' ' 
57161MaxEmptyLinesToKeep : 1 
58162NamespaceIndentation : None 
163+ ObjCBinPackProtocolList : Never 
164+ ObjCBlockIndentWidth : 2 
165+ ObjCBreakBeforeNestedBlockParam : true 
59166ObjCSpaceAfterProperty : false 
60167ObjCSpaceBeforeProtocolList : true 
168+ PackConstructorInitializers : NextLine 
169+ PenaltyBreakAssignment : 2 
170+ PenaltyBreakBeforeFirstCallParameter : 1 
171+ PenaltyBreakComment : 300 
172+ PenaltyBreakFirstLessLess : 120 
173+ PenaltyBreakOpenParenthesis : 0 
174+ PenaltyBreakScopeResolution : 500 
175+ PenaltyBreakString : 1000 
176+ PenaltyBreakTemplateDeclaration : 10 
177+ PenaltyExcessCharacter : 1000000 
178+ PenaltyIndentedWhitespace : 0 
179+ PenaltyReturnTypeOnItsOwnLine : 200 
61180PointerAlignment : Left 
62- ReflowComments : false 
63- #  SeparateDefinitionBlocks: Always   # Only support since clang-format 14
181+ PPIndentWidth :   -1 
182+ QualifierAlignment : Leave 
183+ RawStringFormats :
184+   - Language :        Cpp 
185+     Delimiters :
186+       - cc 
187+       - CC 
188+       - cpp 
189+       - Cpp 
190+       - CPP 
191+       - ' c++' 
192+       - ' C++' 
193+     CanonicalDelimiter : ' ' 
194+     BasedOnStyle :    google 
195+   - Language :        TextProto 
196+     Delimiters :
197+       - pb 
198+       - PB 
199+       - proto 
200+       - PROTO 
201+     EnclosingFunctions :
202+       - EqualsProto 
203+       - EquivToProto 
204+       - PARSE_PARTIAL_TEXT_PROTO 
205+       - PARSE_TEST_PROTO 
206+       - PARSE_TEXT_PROTO 
207+       - ParseTextOrDie 
208+       - ParseTextProtoOrDie 
209+       - ParseTestProto 
210+       - ParsePartialTestProto 
211+     CanonicalDelimiter : pb 
212+     BasedOnStyle :    google 
213+ ReferenceAlignment : Pointer 
214+ ReflowComments :  true 
215+ RemoveBracesLLVM : false 
216+ RemoveParentheses : Leave 
217+ RemoveSemicolon : false 
218+ RequiresClausePosition : OwnLine 
219+ RequiresExpressionIndentation : OuterScope 
220+ SeparateDefinitionBlocks : Leave 
221+ ShortNamespaceLines : 1 
222+ SkipMacroDefinitionBody : false 
223+ SortIncludes :    CaseSensitive 
224+ SortJavaStaticImport : Before 
225+ SortUsingDeclarations : LexicographicNumeric 
64226SpaceAfterCStyleCast : false 
65227SpaceAfterLogicalNot : false 
66228SpaceAfterTemplateKeyword : true 
229+ SpaceAroundPointerQualifiers : Default 
67230SpaceBeforeAssignmentOperators : true 
231+ SpaceBeforeCaseColon : false 
68232SpaceBeforeCpp11BracedList : false 
69233SpaceBeforeCtorInitializerColon : true 
70234SpaceBeforeInheritanceColon : true 
235+ SpaceBeforeJsonColon : false 
71236SpaceBeforeParens : ControlStatements 
237+ SpaceBeforeParensOptions :
238+   AfterControlStatements : true 
239+   AfterForeachMacros : true 
240+   AfterFunctionDefinitionName : false 
241+   AfterFunctionDeclarationName : false 
242+   AfterIfMacros :   true 
243+   AfterOverloadedOperator : false 
244+   AfterPlacementOperator : true 
245+   AfterRequiresInClause : false 
246+   AfterRequiresInExpression : false 
247+   BeforeNonEmptyParentheses : false 
72248SpaceBeforeRangeBasedForLoopColon : true 
73249SpaceBeforeSquareBrackets : false 
74- SpaceInEmptyParentheses : false 
250+ SpaceInEmptyBlock : false 
75251SpacesBeforeTrailingComments : 2 
76- SpacesInAngles : false 
77- SpacesInCStyleCastParentheses : false 
78- SpacesInContainerLiterals : false 
79- SpacesInParentheses : false 
252+ SpacesInAngles :  Never 
253+ SpacesInContainerLiterals : true 
254+ SpacesInLineCommentPrefix :
255+   Minimum :         1 
256+   Maximum :         -1 
257+ SpacesInParens :  Never 
258+ SpacesInParensOptions :
259+   InCStyleCasts :   false 
260+   InConditionalStatements : false 
261+   InEmptyParentheses : false 
262+   Other :           false 
80263SpacesInSquareBrackets : false 
81- Standard : c++11 
82- TabWidth : 4 
83- UseTab : Never 
264+ Standard :        Auto 
265+ StatementAttributeLikeMacros :
266+   - Q_EMIT 
267+ StatementMacros :
268+   - Q_UNUSED 
269+   - QT_REQUIRE_VERSION 
270+ TabWidth :        8 
271+ UseTab :          Never 
272+ VerilogBreakBetweenInstancePorts : true 
273+ WhitespaceSensitiveMacros :
274+   - BOOST_PP_STRINGIZE 
275+   - CF_SWIFT_NAME 
276+   - NS_SWIFT_NAME 
277+   - PP_STRINGIZE 
278+   - STRINGIZE 
279+ ...
280+ 
0 commit comments