Skip to content

Commit 83fac49

Browse files
committed
Cleaning .clang-format and formatting everything with it
1 parent 8e25801 commit 83fac49

File tree

573 files changed

+86163
-74234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

573 files changed

+86163
-74234
lines changed

.clang-format

+139-62
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,163 @@
1-
AccessModifierOffset: '-4'
1+
Language: Cpp
2+
AccessModifierOffset: '-4'
23
AlignAfterOpenBracket: AlwaysBreak
3-
AlignConsecutiveMacros: 'true'
4-
AlignConsecutiveAssignments: 'true'
5-
AlignConsecutiveDeclarations: 'true'
4+
AlignArrayOfStructures: Right
5+
AlignConsecutiveMacros: Consecutive
6+
AlignConsecutiveAssignments: Consecutive
7+
AlignConsecutiveBitFields: Consecutive
8+
AlignConsecutiveDeclarations: Consecutive
69
AlignEscapedNewlines: Left
7-
AlignOperands: 'true'
8-
AlignTrailingComments: 'true'
9-
AllowAllArgumentsOnNextLine: 'true'
10-
AllowAllConstructorInitializersOnNextLine: 'true'
11-
AllowAllParametersOfDeclarationOnNextLine: 'true'
12-
AllowShortBlocksOnASingleLine: 'false'
13-
AllowShortCaseLabelsOnASingleLine: 'false'
10+
AlignOperands: Align
11+
AlignTrailingComments: true
12+
AllowAllArgumentsOnNextLine: true
13+
AllowAllConstructorInitializersOnNextLine: true
14+
AllowAllParametersOfDeclarationOnNextLine: true
15+
AllowShortBlocksOnASingleLine: false
16+
AllowShortCaseLabelsOnASingleLine: false
17+
AllowShortEnumsOnASingleLine: false
1418
AllowShortFunctionsOnASingleLine: Empty
1519
AllowShortIfStatementsOnASingleLine: Never
1620
AllowShortLambdasOnASingleLine: Empty
17-
AllowShortLoopsOnASingleLine: 'false'
21+
AllowShortLoopsOnASingleLine: false
1822
AlwaysBreakAfterReturnType: None
19-
AlwaysBreakBeforeMultilineStrings: 'false'
23+
AlwaysBreakBeforeMultilineStrings: false
24+
AlwaysBreakAfterDefinitionReturnType: None
2025
AlwaysBreakTemplateDeclarations: 'Yes'
21-
BinPackArguments: 'true'
22-
BinPackParameters: 'true'
26+
AttributeMacros:
27+
- __capability
28+
BinPackArguments: true
29+
BinPackParameters: true
30+
BraceWrapping:
31+
AfterCaseLabel: false
32+
AfterClass: false
33+
AfterControlStatement: Never
34+
AfterEnum: false
35+
AfterFunction: false
36+
AfterNamespace: false
37+
AfterObjCDeclaration: false
38+
AfterStruct: false
39+
AfterUnion: false
40+
AfterExternBlock: false
41+
BeforeCatch: false
42+
BeforeElse: false
43+
BeforeLambdaBody: false
44+
BeforeWhile: false
45+
IndentBraces: false
46+
SplitEmptyFunction: true
47+
SplitEmptyRecord: true
48+
SplitEmptyNamespace: true
2349
BreakBeforeBinaryOperators: All
50+
BreakBeforeConceptDeclarations: true
2451
BreakBeforeBraces: Attach
25-
BreakBeforeTernaryOperators: 'true'
26-
BreakConstructorInitializers: BeforeColon
2752
BreakInheritanceList: BeforeColon
28-
CompactNamespaces: 'true'
29-
ConstructorInitializerIndentWidth: '8'
30-
ContinuationIndentWidth: '8'
31-
Cpp11BracedListStyle: 'true'
32-
DerivePointerAlignment: 'false'
33-
DisableFormat: 'false'
34-
FixNamespaceComments: 'true'
53+
BreakBeforeTernaryOperators: true
54+
BreakConstructorInitializers: BeforeColon
55+
BreakStringLiterals: true
56+
ColumnLimit: 80
57+
CompactNamespaces: true
58+
ConstructorInitializerIndentWidth: 8
59+
ContinuationIndentWidth: 8
60+
Cpp11BracedListStyle: true
61+
DeriveLineEnding: true
62+
DerivePointerAlignment: false
63+
DisableFormat: false
64+
EmptyLineAfterAccessModifier: Never
65+
EmptyLineBeforeAccessModifier: LogicalBlock
66+
FixNamespaceComments: true
3567
IncludeBlocks: Regroup
3668
IncludeCategories:
3769
# config.h must come first.
38-
- Regex: '["<]config.h+[>"]'
39-
Priority: -1
70+
- Regex: '["<]config.h+[>"]'
71+
Priority: -2
72+
SortPriority: 0
73+
CaseSensitive: false
4074
# pent_include.h.
41-
- Regex: '["<]pent_include.h+[>"]'
42-
Priority: 1
75+
- Regex: '["<]pent_include.h+[>"]'
76+
Priority: -1
77+
SortPriority: 0
78+
CaseSensitive: false
4379
# mmsystem.h must come after windows.h, which is at the normal headers with extension.
44-
- Regex: '["<]mmsystem.h+[>"]'
45-
Priority: 4
80+
- Regex: '["<]mmsystem.h+[>"]'
81+
Priority: 4
82+
SortPriority: 0
83+
CaseSensitive: false
4684
# Headers in <> without extension.
47-
- Regex: '<([A-Za-z0-9\Q/-_\E])+>'
48-
Priority: 5
85+
- Regex: '<([A-Za-z0-9\Q/-_\E])+>'
86+
Priority: 5
87+
SortPriority: 0
88+
CaseSensitive: false
89+
# Boost headers.
90+
- Regex: '<boost/([A-Za-z0-9.\Q/-_\E])+>'
91+
Priority: 4
92+
SortPriority: 0
93+
CaseSensitive: false
4994
# Headers in <> with extension.
50-
- Regex: '<([A-Za-z0-9.\Q/-_\E])+>'
51-
Priority: 3
95+
- Regex: '<([A-Za-z0-9.\Q/-_\E])+>'
96+
Priority: 3
97+
SortPriority: 0
98+
CaseSensitive: false
5299
# Headers in "" with extension.
53-
- Regex: '"([A-Za-z0-9.\Q/-_\E])+"'
54-
Priority: 2
55-
IndentCaseLabels: 'false'
56-
IncludeIsMainRegex: '$'
100+
- Regex: '"([A-Za-z0-9.\Q/-_\E])+"'
101+
Priority: 2
102+
SortPriority: 0
103+
CaseSensitive: false
104+
IncludeIsMainRegex: "$"
105+
IncludeIsMainSourceRegex: ""
106+
IndentAccessModifiers: false
107+
IndentCaseLabels: false
108+
IndentCaseBlocks: false
109+
IndentGotoLabels: true
57110
IndentPPDirectives: AfterHash
111+
IndentExternBlock: AfterExternBlock
58112
IndentWidth: '4'
59-
IndentWrappedFunctionNames: 'true'
60-
KeepEmptyLinesAtTheStartOfBlocks: 'false'
61-
Language: Cpp
62-
MaxEmptyLinesToKeep: '1'
113+
IndentRequires: true
114+
IndentRequiresClause: false
115+
RequiresClausePosition: OwnLine
116+
InsertBraces: true
117+
SeparateDefinitionBlocks: Always
118+
IndentWrappedFunctionNames: true
119+
InsertTrailingCommas: None
120+
KeepEmptyLinesAtTheStartOfBlocks: false
121+
LambdaBodyIndentation: Signature
122+
MaxEmptyLinesToKeep: 1
63123
NamespaceIndentation: All
124+
PenaltyExcessCharacter: 1000000
125+
PenaltyReturnTypeOnItsOwnLine: 10000000
64126
PointerAlignment: Left
65-
ReflowComments: 'true'
66-
SortIncludes: 'true'
67-
SortUsingDeclarations: 'true'
68-
SpaceAfterCStyleCast: 'false'
69-
SpaceAfterLogicalNot: 'false'
70-
SpaceAfterTemplateKeyword: 'true'
71-
SpaceBeforeAssignmentOperators: 'true'
72-
SpaceBeforeCpp11BracedList: 'false'
73-
SpaceBeforeCtorInitializerColon: 'true'
74-
SpaceBeforeInheritanceColon: 'true'
127+
PPIndentWidth: -1
128+
QualifierAlignment: Custom
129+
QualifierOrder: ["constexpr", "static", "inline", "const", "volatile", "type"]
130+
ReferenceAlignment: Pointer
131+
ReflowComments: true
132+
SortIncludes: true
133+
CommentPragmas: '^\\.+'
134+
ShortNamespaceLines: 1
135+
SortUsingDeclarations: true
136+
SpaceAfterCStyleCast: false
137+
SpaceAfterLogicalNot: false
138+
SpaceAfterTemplateKeyword: true
139+
SpaceBeforeAssignmentOperators: true
140+
SpaceBeforeCaseColon: false
141+
SpaceBeforeCpp11BracedList: false
142+
SpaceBeforeCtorInitializerColon: true
143+
SpaceBeforeInheritanceColon: true
75144
SpaceBeforeParens: ControlStatements
76-
SpaceBeforeRangeBasedForLoopColon: 'true'
77-
SpaceInEmptyParentheses: 'false'
78-
SpacesBeforeTrailingComments: '4'
79-
SpacesInAngles: 'false'
80-
SpacesInCStyleCastParentheses: 'false'
81-
SpacesInContainerLiterals: 'false'
82-
SpacesInParentheses: 'false'
83-
SpacesInSquareBrackets: 'false'
84-
Standard: Cpp11
85-
TabWidth: '4'
145+
SpaceAroundPointerQualifiers: Default
146+
SpaceBeforeRangeBasedForLoopColon: true
147+
SpaceInEmptyBlock: false
148+
SpaceInEmptyParentheses: false
149+
SpacesBeforeTrailingComments: 4
150+
SpacesInAngles: Never
151+
SpacesInCStyleCastParentheses: false
152+
SpacesInConditionalStatement: false
153+
SpacesInContainerLiterals: false
154+
SpacesInLineCommentPrefix:
155+
Minimum: 1
156+
Maximum: -1
157+
SpacesInParentheses: false
158+
SpacesInSquareBrackets: false
159+
SpaceBeforeSquareBrackets: false
160+
BitFieldColonSpacing: Both
161+
Standard: Latest
162+
TabWidth: 4
86163
UseTab: ForContinuationAndIndentation

.clangd

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ CompileFlags:
2929
-Wno-global-constructors,
3030
-Wno-exit-time-destructors,
3131
-Wno-missing-prototypes,
32+
-DUSE_TIMIDITY_MIDI,
3233
]
3334
Remove: -W*
3435
Compiler: D:/msys64/mingw64/bin/clang++.exe

0 commit comments

Comments
 (0)