Skip to content

Commit 414df9d

Browse files
kurisaWRbb666
authored andcommitted
improve[clang-format]: optimize the formatting logic for RT-Thread coding standard
1 parent 0785e22 commit 414df9d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.clang-format

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Language: Cpp
88
BasedOnStyle: LLVM
99
AccessModifierOffset: -1
1010
AlignAfterOpenBracket: Align
11-
AlignArrayOfStructures: Right
11+
AlignArrayOfStructures: None
1212
AlignConsecutiveAssignments:
13-
Enabled: true
13+
Enabled: false
1414
AcrossEmptyLines: false
1515
AcrossComments: false
1616
AlignCompound: true
@@ -22,7 +22,7 @@ AlignConsecutiveBitFields:
2222
AlignCompound: true
2323
PadOperators: true
2424
AlignConsecutiveDeclarations:
25-
Enabled: true
25+
Enabled: false
2626
AcrossEmptyLines: false
2727
AcrossComments: false
2828
AlignCompound: false
@@ -41,14 +41,14 @@ AlignConsecutiveShortCaseStatements:
4141
AlignEscapedNewlines: Left
4242
AlignOperands: Align
4343
AlignTrailingComments:
44-
Kind: Always
44+
Kind: Leave
4545
OverEmptyLines: 1
4646
AllowAllArgumentsOnNextLine: false
4747
AllowAllParametersOfDeclarationOnNextLine: false
4848
AllowShortBlocksOnASingleLine: false
4949
AllowShortCaseLabelsOnASingleLine: false
5050
AllowShortEnumsOnASingleLine: false
51-
AllowShortFunctionsOnASingleLine: None
51+
AllowShortFunctionsOnASingleLine: Inline
5252
AllowShortIfStatementsOnASingleLine: false
5353
AllowShortLambdasOnASingleLine: All
5454
AllowShortLoopsOnASingleLine: false
@@ -63,7 +63,7 @@ BinPackParameters: true
6363
BitFieldColonSpacing: Both
6464
BreakBeforeBraces: Custom
6565
BraceWrapping:
66-
AfterCaseLabel: false
66+
AfterCaseLabel: true
6767
AfterClass: true
6868
AfterControlStatement: Always
6969
AfterEnum: true
@@ -153,7 +153,7 @@ LineEnding: DeriveLF
153153
MacroBlockBegin: ""
154154
MacroBlockEnd: ""
155155
MaxEmptyLinesToKeep: 2
156-
NamespaceIndentation: None
156+
NamespaceIndentation: All
157157
ObjCBinPackProtocolList: Auto
158158
ObjCBlockIndentWidth: 2
159159
ObjCBreakBeforeNestedBlockParam: true

0 commit comments

Comments
 (0)