Xinqi Bao's Git

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