diff options
| author | Yuqiang Wang <[email protected]> | 2025-09-24 21:19:54 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-09-25 14:23:34 +0800 |
| commit | 414df9d379cc54a96b4432dae656ccbef7e2357f (patch) | |
| tree | ff84d30d397df4fccde23f923339981789f8fe24 | |
| parent | 0785e224ce58b44d0c870a4c2545fa9fca3211e0 (diff) | |
improve[clang-format]: optimize the formatting logic for RT-Thread coding standard
| -rw-r--r-- | .clang-format | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/.clang-format b/.clang-format index 7cca2ba20d..deb88cf917 100644 --- a/.clang-format +++ b/.clang-format @@ -8,9 +8,9 @@ Language: Cpp BasedOnStyle: LLVM AccessModifierOffset: -1 AlignAfterOpenBracket: Align -AlignArrayOfStructures: Right +AlignArrayOfStructures: None AlignConsecutiveAssignments: - Enabled: true + Enabled: false AcrossEmptyLines: false AcrossComments: false AlignCompound: true @@ -22,7 +22,7 @@ AlignConsecutiveBitFields: AlignCompound: true PadOperators: true AlignConsecutiveDeclarations: - Enabled: true + Enabled: false AcrossEmptyLines: false AcrossComments: false AlignCompound: false @@ -41,14 +41,14 @@ AlignConsecutiveShortCaseStatements: AlignEscapedNewlines: Left AlignOperands: Align AlignTrailingComments: - Kind: Always + Kind: Leave OverEmptyLines: 1 AllowAllArgumentsOnNextLine: false AllowAllParametersOfDeclarationOnNextLine: false AllowShortBlocksOnASingleLine: false AllowShortCaseLabelsOnASingleLine: false AllowShortEnumsOnASingleLine: false -AllowShortFunctionsOnASingleLine: None +AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: false AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: false @@ -63,7 +63,7 @@ BinPackParameters: true BitFieldColonSpacing: Both BreakBeforeBraces: Custom BraceWrapping: - AfterCaseLabel: false + AfterCaseLabel: true AfterClass: true AfterControlStatement: Always AfterEnum: true @@ -153,7 +153,7 @@ LineEnding: DeriveLF MacroBlockBegin: "" MacroBlockEnd: "" MaxEmptyLinesToKeep: 2 -NamespaceIndentation: None +NamespaceIndentation: All ObjCBinPackProtocolList: Auto ObjCBlockIndentWidth: 2 ObjCBreakBeforeNestedBlockParam: true |
