mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
clang-format: Update to clang-format >= 6
We get new interesting formating with clang-format greater or equal to 6 as stated in the removed comments. Miguel Ojeda suggested to even move the minimal clang-format version to 11, which is the minimum LLVM supported at the moment [1]. Automatically updated with: sed -i 's/^\(\s*\)#\(\S*\s\+\S*\) # Unknown to clang-format.*/\1\2/' .clang-format Link: https://lore.kernel.org/r/CANiq72nLOfmEt-CZBmm2ouEB_x6Jm9ggDVFCVJxYxKw7O0LTzQ@mail.gmail.com [1] Cc: Miguel Ojeda <ojeda@kernel.org> Cc: Tom Rix <trix@redhat.com> Signed-off-by: Mickaël Salaün <mic@digikod.net> Link: https://lore.kernel.org/r/20220506160106.522341-3-mic@digikod.net Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
This commit is contained in:
parent
49bb63a261
commit
96232c7d4f
@ -1,6 +1,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
#
|
#
|
||||||
# clang-format configuration file. Intended for clang-format >= 4.
|
# clang-format configuration file. Intended for clang-format >= 6.
|
||||||
#
|
#
|
||||||
# For more information, see:
|
# For more information, see:
|
||||||
#
|
#
|
||||||
@ -13,7 +13,7 @@ AccessModifierOffset: -4
|
|||||||
AlignAfterOpenBracket: Align
|
AlignAfterOpenBracket: Align
|
||||||
AlignConsecutiveAssignments: false
|
AlignConsecutiveAssignments: false
|
||||||
AlignConsecutiveDeclarations: false
|
AlignConsecutiveDeclarations: false
|
||||||
#AlignEscapedNewlines: Left # Unknown to clang-format-4.0
|
AlignEscapedNewlines: Left
|
||||||
AlignOperands: true
|
AlignOperands: true
|
||||||
AlignTrailingComments: false
|
AlignTrailingComments: false
|
||||||
AllowAllParametersOfDeclarationOnNextLine: false
|
AllowAllParametersOfDeclarationOnNextLine: false
|
||||||
@ -37,24 +37,24 @@ BraceWrapping:
|
|||||||
AfterObjCDeclaration: false
|
AfterObjCDeclaration: false
|
||||||
AfterStruct: false
|
AfterStruct: false
|
||||||
AfterUnion: false
|
AfterUnion: false
|
||||||
#AfterExternBlock: false # Unknown to clang-format-5.0
|
AfterExternBlock: false
|
||||||
BeforeCatch: false
|
BeforeCatch: false
|
||||||
BeforeElse: false
|
BeforeElse: false
|
||||||
IndentBraces: false
|
IndentBraces: false
|
||||||
#SplitEmptyFunction: true # Unknown to clang-format-4.0
|
SplitEmptyFunction: true
|
||||||
#SplitEmptyRecord: true # Unknown to clang-format-4.0
|
SplitEmptyRecord: true
|
||||||
#SplitEmptyNamespace: true # Unknown to clang-format-4.0
|
SplitEmptyNamespace: true
|
||||||
BreakBeforeBinaryOperators: None
|
BreakBeforeBinaryOperators: None
|
||||||
BreakBeforeBraces: Custom
|
BreakBeforeBraces: Custom
|
||||||
#BreakBeforeInheritanceComma: false # Unknown to clang-format-4.0
|
BreakBeforeInheritanceComma: false
|
||||||
BreakBeforeTernaryOperators: false
|
BreakBeforeTernaryOperators: false
|
||||||
BreakConstructorInitializersBeforeComma: false
|
BreakConstructorInitializersBeforeComma: false
|
||||||
#BreakConstructorInitializers: BeforeComma # Unknown to clang-format-4.0
|
BreakConstructorInitializers: BeforeComma
|
||||||
BreakAfterJavaFieldAnnotations: false
|
BreakAfterJavaFieldAnnotations: false
|
||||||
BreakStringLiterals: false
|
BreakStringLiterals: false
|
||||||
ColumnLimit: 80
|
ColumnLimit: 80
|
||||||
CommentPragmas: '^ IWYU pragma:'
|
CommentPragmas: '^ IWYU pragma:'
|
||||||
#CompactNamespaces: false # Unknown to clang-format-4.0
|
CompactNamespaces: false
|
||||||
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||||
ConstructorInitializerIndentWidth: 8
|
ConstructorInitializerIndentWidth: 8
|
||||||
ContinuationIndentWidth: 8
|
ContinuationIndentWidth: 8
|
||||||
@ -62,7 +62,7 @@ Cpp11BracedListStyle: false
|
|||||||
DerivePointerAlignment: false
|
DerivePointerAlignment: false
|
||||||
DisableFormat: false
|
DisableFormat: false
|
||||||
ExperimentalAutoDetectBinPacking: false
|
ExperimentalAutoDetectBinPacking: false
|
||||||
#FixNamespaceComments: false # Unknown to clang-format-4.0
|
FixNamespaceComments: false
|
||||||
|
|
||||||
# Taken from:
|
# Taken from:
|
||||||
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
|
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' include/ tools/ \
|
||||||
@ -627,13 +627,13 @@ ForEachMacros:
|
|||||||
- 'xbc_node_for_each_subkey'
|
- 'xbc_node_for_each_subkey'
|
||||||
- 'zorro_for_each_dev'
|
- 'zorro_for_each_dev'
|
||||||
|
|
||||||
#IncludeBlocks: Preserve # Unknown to clang-format-5.0
|
IncludeBlocks: Preserve
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
- Regex: '.*'
|
- Regex: '.*'
|
||||||
Priority: 1
|
Priority: 1
|
||||||
IncludeIsMainRegex: '(Test)?$'
|
IncludeIsMainRegex: '(Test)?$'
|
||||||
IndentCaseLabels: false
|
IndentCaseLabels: false
|
||||||
#IndentPPDirectives: None # Unknown to clang-format-5.0
|
IndentPPDirectives: None
|
||||||
IndentWidth: 8
|
IndentWidth: 8
|
||||||
IndentWrappedFunctionNames: false
|
IndentWrappedFunctionNames: false
|
||||||
JavaScriptQuotes: Leave
|
JavaScriptQuotes: Leave
|
||||||
@ -643,13 +643,13 @@ MacroBlockBegin: ''
|
|||||||
MacroBlockEnd: ''
|
MacroBlockEnd: ''
|
||||||
MaxEmptyLinesToKeep: 1
|
MaxEmptyLinesToKeep: 1
|
||||||
NamespaceIndentation: None
|
NamespaceIndentation: None
|
||||||
#ObjCBinPackProtocolList: Auto # Unknown to clang-format-5.0
|
ObjCBinPackProtocolList: Auto
|
||||||
ObjCBlockIndentWidth: 8
|
ObjCBlockIndentWidth: 8
|
||||||
ObjCSpaceAfterProperty: true
|
ObjCSpaceAfterProperty: true
|
||||||
ObjCSpaceBeforeProtocolList: true
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
|
||||||
# Taken from git's rules
|
# Taken from git's rules
|
||||||
#PenaltyBreakAssignment: 10 # Unknown to clang-format-4.0
|
PenaltyBreakAssignment: 10
|
||||||
PenaltyBreakBeforeFirstCallParameter: 30
|
PenaltyBreakBeforeFirstCallParameter: 30
|
||||||
PenaltyBreakComment: 10
|
PenaltyBreakComment: 10
|
||||||
PenaltyBreakFirstLessLess: 0
|
PenaltyBreakFirstLessLess: 0
|
||||||
@ -660,14 +660,14 @@ PenaltyReturnTypeOnItsOwnLine: 60
|
|||||||
PointerAlignment: Right
|
PointerAlignment: Right
|
||||||
ReflowComments: false
|
ReflowComments: false
|
||||||
SortIncludes: false
|
SortIncludes: false
|
||||||
#SortUsingDeclarations: false # Unknown to clang-format-4.0
|
SortUsingDeclarations: false
|
||||||
SpaceAfterCStyleCast: false
|
SpaceAfterCStyleCast: false
|
||||||
SpaceAfterTemplateKeyword: true
|
SpaceAfterTemplateKeyword: true
|
||||||
SpaceBeforeAssignmentOperators: true
|
SpaceBeforeAssignmentOperators: true
|
||||||
#SpaceBeforeCtorInitializerColon: true # Unknown to clang-format-5.0
|
SpaceBeforeCtorInitializerColon: true
|
||||||
#SpaceBeforeInheritanceColon: true # Unknown to clang-format-5.0
|
SpaceBeforeInheritanceColon: true
|
||||||
SpaceBeforeParens: ControlStatements
|
SpaceBeforeParens: ControlStatements
|
||||||
#SpaceBeforeRangeBasedForLoopColon: true # Unknown to clang-format-5.0
|
SpaceBeforeRangeBasedForLoopColon: true
|
||||||
SpaceInEmptyParentheses: false
|
SpaceInEmptyParentheses: false
|
||||||
SpacesBeforeTrailingComments: 1
|
SpacesBeforeTrailingComments: 1
|
||||||
SpacesInAngles: false
|
SpacesInAngles: false
|
||||||
|
Loading…
Reference in New Issue
Block a user