clang-format: Update the .clang-format files to conformance clang-format json-schema

The document is at
https://clang.llvm.org/docs/ClangFormatStyleOptions.html

The json-schema at
https://www.schemastore.org/clang-format.json

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37235>
This commit is contained in:
Yonggang Luo 2025-09-08 21:19:46 +08:00 committed by Marge Bot
parent 4143f0725a
commit 773a7f347a
17 changed files with 59 additions and 59 deletions

View file

@ -1,15 +1,15 @@
AlignAfterOpenBracket: true
AlignConsecutiveMacros: true
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: Consecutive
AllowAllArgumentsOnNextLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AlwaysBreakAfterReturnType: TopLevelDefinitions
BraceWrapping:
AfterControlStatement: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterStruct: false

View file

@ -24,7 +24,7 @@ AllowShortLambdasOnASingleLine: All
# Wrap before LambdaBody and disable SplitEmptyFunction
BraceWrapping:
AfterControlStatement: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: true
AfterStruct: false

View file

@ -2,7 +2,7 @@
BasedOnStyle: InheritParentConfig
DisableFormat: false
AlignConsecutiveBitFields: true
AlignConsecutiveBitFields: Consecutive
ColumnLimit: 80
BreakStringLiterals: false
SpaceBeforeParens: ControlStatementsExceptControlMacros

View file

@ -2,6 +2,6 @@
BasedOnStyle: InheritParentConfig
DisableFormat: false
AlignConsecutiveBitFields: true
AlignConsecutiveBitFields: Consecutive
ColumnLimit: 100
BreakStringLiterals: false

View file

@ -2,6 +2,6 @@
BasedOnStyle: InheritParentConfig
DisableFormat: false
AlignConsecutiveBitFields: true
AlignConsecutiveBitFields: Consecutive
ColumnLimit: 100
BreakStringLiterals: false

View file

@ -2,6 +2,6 @@
BasedOnStyle: InheritParentConfig
DisableFormat: false
AlignConsecutiveBitFields: true
AlignConsecutiveBitFields: Consecutive
ColumnLimit: 100
BreakStringLiterals: false

View file

@ -2,7 +2,7 @@
BasedOnStyle: InheritParentConfig
DisableFormat: false
AlignConsecutiveBitFields: true
AlignConsecutiveBitFields: Consecutive
ColumnLimit: 80
BreakStringLiterals: false

View file

@ -3,10 +3,10 @@ BasedOnStyle: InheritParentConfig
DisableFormat: false
ColumnLimit: 120
SortIncludes: false
SortIncludes: Never
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignTrailingComments: true
PenaltyExcessCharacter: 75
@ -51,7 +51,7 @@ SpaceBeforeCtorInitializerColon: true
SpacesInContainerLiterals: true
SpaceBeforeParens: ControlStatements
SpacesBeforeTrailingComments: 3
SpacesInAngles: false
SpacesInAngles: Never
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpacesInCStyleCastParentheses: false

View file

@ -2,7 +2,7 @@
BasedOnStyle: InheritParentConfig
DisableFormat: false
AllowShortFunctionsOnASingleLine: true
AllowShortFunctionsOnASingleLine: All
AlwaysBreakAfterReturnType: TopLevel
AllowShortEnumsOnASingleLine: false
BinPackParameters: false

View file

@ -3,10 +3,10 @@ BasedOnStyle: InheritParentConfig
DisableFormat: false
ColumnLimit: 132
SortIncludes: true
SortIncludes: CaseSensitive
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveAssignments: None
AlignConsecutiveDeclarations: None
AlignTrailingComments: true
PenaltyExcessCharacter: 75
@ -23,7 +23,7 @@ BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: true
AfterControlStatement: Always
AfterEnum: true
AfterNamespace: true
AfterObjCDeclaration: true
@ -54,7 +54,7 @@ SpaceBeforeParens: Custom
SpaceBeforeParensOptions:
AfterControlStatements: false
SpacesBeforeTrailingComments: 3
SpacesInAngles: false
SpacesInAngles: Never
SpacesInParentheses: true
SpacesInSquareBrackets: false
SpacesInCStyleCastParentheses: false

View file

@ -66,10 +66,10 @@ Cpp11BracedListStyle: false
########################
# Whitespace Alignment #
########################
AlignConsecutiveAssignments: false
AlignConsecutiveAssignments: None
#AlignConsecutiveBitFields: false # Requires clang-11
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignConsecutiveDeclarations: None
AlignConsecutiveMacros: None
AlignTrailingComments: false
AlignEscapedNewlines: Left
@ -93,7 +93,7 @@ SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesInAngles: false
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
@ -158,7 +158,7 @@ SortUsingDeclarations: true
############
# TODO: Temporary config
IncludeBlocks: Preserve
SortIncludes: false
SortIncludes: Never
# TODO: This requires additional work to clean up headers & includes first
#IncludeBlocks: Regroup
#SortIncludes: true

View file

@ -1,21 +1,21 @@
BasedOnStyle: WebKit
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: None
AlwaysBreakBeforeMultilineStrings: 'true'
BinPackArguments: 'false'
BinPackParameters: 'false'
AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Linux
ColumnLimit: '100'
Cpp11BracedListStyle: 'true'
KeepEmptyLinesAtTheStartOfBlocks: 'false'
ColumnLimit: 100
Cpp11BracedListStyle: true
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: None
PointerAlignment: Right
SortIncludes: 'true'
SpaceAfterTemplateKeyword: 'false'
Standard: Cpp11
TabWidth: '3'
IndentWidth: '3'
ConstructorInitializerIndentWidth: '3'
ContinuationIndentWidth: '3'
SortIncludes: CaseSensitive
SpaceAfterTemplateKeyword: false
Standard: c++11
TabWidth: 3
IndentWidth: 3
ConstructorInitializerIndentWidth: 3
ContinuationIndentWidth: 3

View file

@ -2,7 +2,7 @@
BasedOnStyle: InheritParentConfig
DisableFormat: false
AlignConsecutiveBitFields: true
AlignConsecutiveBitFields: Consecutive
ColumnLimit: 80
BreakStringLiterals: false
SpaceBeforeParens: ControlStatementsExceptControlMacros

View file

@ -1,21 +1,21 @@
BasedOnStyle: WebKit
AlignTrailingComments: 'true'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: None
AlwaysBreakBeforeMultilineStrings: 'true'
BinPackArguments: 'false'
BinPackParameters: 'false'
AlwaysBreakBeforeMultilineStrings: true
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Linux
ColumnLimit: '100'
Cpp11BracedListStyle: 'true'
KeepEmptyLinesAtTheStartOfBlocks: 'false'
ColumnLimit: 100
Cpp11BracedListStyle: true
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: None
PointerAlignment: Right
SortIncludes: 'true'
SpaceAfterTemplateKeyword: 'false'
Standard: Cpp11
TabWidth: '3'
IndentWidth: '3'
ConstructorInitializerIndentWidth: '3'
ContinuationIndentWidth: '3'
SortIncludes: CaseSensitive
SpaceAfterTemplateKeyword: false
Standard: c++11
TabWidth: 3
IndentWidth: 3
ConstructorInitializerIndentWidth: 3
ContinuationIndentWidth: 3

View file

@ -3,7 +3,7 @@
BasedOnStyle: LLVM
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
BreakBeforeBraces: Linux
ColumnLimit: 100

View file

@ -25,4 +25,4 @@ IncludeCategories:
ForEachMacros:
- vk_outarray_append_typed
SpaceBeforeParens: ControlStatementsExceptForEachMacros
SpaceBeforeParens: ControlStatementsExceptControlMacros

View file

@ -1,6 +1,6 @@
BasedOnStyle: InheritParentConfig
DisableFormat: false
AlignConsecutiveBitFields: true
AlignConsecutiveBitFields: Consecutive
ColumnLimit: 80
BreakStringLiterals: false