tools: add clang-format formatting script for CI (#10684)

* tools: add clang-format formatting script for CI

* improve[ci]: standardize the naming of CI files related to clang-format
This commit is contained in:
Yuqiang Wang
2025-09-23 17:38:09 +08:00
committed by GitHub
parent 35672cd5cb
commit 4123daf00c
3 changed files with 385 additions and 8 deletions

View File

@@ -4,7 +4,6 @@
#
# clang-format -style=llvm -dump-config > .clang-format
#
---
Language: Cpp
BasedOnStyle: LLVM
AccessModifierOffset: -1
@@ -46,13 +45,13 @@ AlignTrailingComments:
OverEmptyLines: 1
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Always
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: WithoutElse
AllowShortIfStatementsOnASingleLine: false
AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
@@ -62,6 +61,7 @@ AttributeMacros:
BinPackArguments: true
BinPackParameters: true
BitFieldColonSpacing: Both
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: true
@@ -86,7 +86,6 @@ BreakAfterJavaFieldAnnotations: false
BreakArrays: false
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Custom
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
@@ -237,6 +236,4 @@ WhitespaceSensitiveMacros:
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
---
- STRINGIZE