[clang-format] Refine style rules with a thread.c formatting example (#11859)

This commit is contained in:
CYFS authored and GitHub committed 2026-10-23 17:09:35 +08:00
1 parent 2f7aba80fb
commit a59e72fb5c
2 files changed
+85 -79

No files matched your search

+9 -9
View File
@@ -41,17 +41,17 @@ AlignConsecutiveShortCaseStatements:
AlignEscapedNewlines: Left
AlignOperands: Align
AlignTrailingComments:
Kind: Leave
OverEmptyLines: 1
Kind: Always
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AllowShortLambdasOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
@@ -67,7 +67,7 @@ BraceWrapping:
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterExternBlock: false
AfterExternBlock: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
@@ -75,8 +75,8 @@ BraceWrapping:
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: false
BeforeLambdaBody: true
BeforeWhile: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
@@ -152,7 +152,7 @@ LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ""
MacroBlockEnd: ""
MaxEmptyLinesToKeep: 2
MaxEmptyLinesToKeep: 1
NamespaceIndentation: All
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
+76 -70
View File
File diff suppressed because it is too large. Load diff