Skip to content

Commit 067c385

Browse files
committed
Consider all the requirements for code formatting
1 parent 74ea971 commit 067c385

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

.clang-format

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ AccessModifierOffset: -2
77
ReflowComments: false
88
ConstructorInitializerIndentWidth: 2
99
ContinuationIndentWidth: 2
10-
AllowShortFunctionsOnASingleLine: None
10+
AllowShortFunctionsOnASingleLine: Inline
1111
BreakBeforeBraces: Custom
1212
BraceWrapping:
1313
AfterExternBlock: true
1414
AfterClass: true
1515
AfterFunction: true
1616
AfterNamespace: false
1717
AfterEnum: false
18-
AfterCaseLabel: false
19-
AfterControlStatement: Never
18+
AfterCaseLabel: true
19+
AfterControlStatement: MultiLine
2020
AfterStruct: false
2121
AfterUnion: false
2222
BeforeLambdaBody: false
@@ -29,7 +29,6 @@ BraceWrapping:
2929
SplitEmptyNamespace: true
3030
PPIndentWidth: 2
3131
FixNamespaceComments: false
32-
# ??????
3332
IndentPPDirectives: BeforeHash
3433
SpaceBeforeParens: Custom
3534
SpaceBeforeParensOptions:
@@ -96,14 +95,13 @@ AlignConsecutiveMacros:
9695
PadOperators: false
9796
AlignEscapedNewlines: DontAlign
9897
AlignOperands: Align
99-
AlignTrailingComments: false
100-
# ??
98+
AlignTrailingComments: true
10199
AllowAllArgumentsOnNextLine: false
102100
AllowAllParametersOfDeclarationOnNextLine: true
103101
AllowShortBlocksOnASingleLine: Empty
104102
AllowShortCaseLabelsOnASingleLine: false
105103
AllowShortEnumsOnASingleLine: true
106-
# AllowShortIfStatementsOnASingleLine: Nevers
104+
AllowShortIfStatementsOnASingleLine: Never
107105
AllowShortLambdasOnASingleLine: All
108106
AllowShortLoopsOnASingleLine: false
109107
AlwaysBreakAfterDefinitionReturnType: None
@@ -128,20 +126,6 @@ EmptyLineAfterAccessModifier: Leave
128126
MaxEmptyLinesToKeep: 1
129127
EmptyLineBeforeAccessModifier: LogicalBlock
130128
ExperimentalAutoDetectBinPacking: false
131-
Macros:
132-
- >-
133-
PyObject_HEAD_INIT(type)={
134-
{ 0xFFFFFFFF },
135-
(type)
136-
},
137-
- >-
138-
PyVarObject_HEAD_INIT(type, size)={
139-
{
140-
{ 0xFFFFFFFF },
141-
(type)
142-
},
143-
(size)
144-
},
145129
ForEachMacros:
146130
- foreach
147131
- Q_FOREACH
@@ -160,7 +144,6 @@ IndentWrappedFunctionNames: false
160144
InsertBraces: false
161145
InsertTrailingCommas: None
162146
KeepEmptyLinesAtTheStartOfBlocks: true
163-
# ???
164147
LambdaBodyIndentation: OuterScope
165148
PackConstructorInitializers: BinPack
166149
RemoveBracesLLVM: false

0 commit comments

Comments
 (0)