|
| 1 | +# SPDX-License-Identifier: GPL-2.0-only |
| 2 | +# |
| 3 | +# clang-format configuration file. Intended for clang-format >= 7. |
| 4 | +# |
| 5 | +# For more information, see: |
| 6 | +# |
| 7 | +# Documentation/process/clang-format.rst |
| 8 | +# https://clang.llvm.org/docs/ClangFormat.html |
| 9 | +# https://clang.llvm.org/docs/ClangFormatStyleOptions.html |
| 10 | +# |
| 11 | +--- |
| 12 | +Language: Cpp |
| 13 | +AccessModifierOffset: -4 |
| 14 | +AlignAfterOpenBracket: Align |
| 15 | +AlignConsecutiveAssignments: false |
| 16 | +AlignConsecutiveDeclarations: false |
| 17 | +AlignEscapedNewlines: Right |
| 18 | +AlignOperands: true |
| 19 | +AlignTrailingComments: false |
| 20 | +AllowAllParametersOfDeclarationOnNextLine: false |
| 21 | +AllowShortBlocksOnASingleLine: false |
| 22 | +AllowShortCaseLabelsOnASingleLine: false |
| 23 | +AllowShortLambdasOnASingleLine: Inline |
| 24 | +AllowShortFunctionsOnASingleLine: InlineOnly |
| 25 | +AllowShortIfStatementsOnASingleLine: false |
| 26 | +AllowShortLoopsOnASingleLine: false |
| 27 | +AlwaysBreakAfterDefinitionReturnType: None |
| 28 | +AlwaysBreakAfterReturnType: None |
| 29 | +AlwaysBreakBeforeMultilineStrings: false |
| 30 | +AlwaysBreakTemplateDeclarations: Yes |
| 31 | +BinPackArguments: true |
| 32 | +BinPackParameters: true |
| 33 | +BreakBeforeBraces: Allman |
| 34 | +BraceWrapping: |
| 35 | + SplitEmptyFunction: true |
| 36 | + SplitEmptyRecord: true |
| 37 | + SplitEmptyNamespace: true |
| 38 | + AfterNamespace: false |
| 39 | + AfterClass: true |
| 40 | +BreakBeforeBinaryOperators: None |
| 41 | +BreakBeforeInheritanceComma: false |
| 42 | +BreakInheritanceList: BeforeColon |
| 43 | +BreakBeforeTernaryOperators: true |
| 44 | +BreakConstructorInitializers: BeforeColon |
| 45 | +BreakAfterJavaFieldAnnotations: false |
| 46 | +BreakStringLiterals: false |
| 47 | +CommentPragmas: '^ IWYU pragma:' |
| 48 | +CompactNamespaces: false |
| 49 | +ConstructorInitializerAllOnOneLineOrOnePerLine: false |
| 50 | +Cpp11BracedListStyle: false |
| 51 | +DerivePointerAlignment: false |
| 52 | +DisableFormat: false |
| 53 | +ExperimentalAutoDetectBinPacking: false |
| 54 | +FixNamespaceComments: true |
| 55 | +ForEachMacros: |
| 56 | + - 'udev_list_entry_foreach' |
| 57 | +IncludeBlocks: Preserve |
| 58 | +IncludeCategories: |
| 59 | + - Regex: '.*' |
| 60 | + Priority: 1 |
| 61 | +IncludeIsMainRegex: '(_test)?$' |
| 62 | +IndentCaseLabels: false |
| 63 | +IndentPPDirectives: None |
| 64 | +IndentWrappedFunctionNames: false |
| 65 | +JavaScriptQuotes: Leave |
| 66 | +JavaScriptWrapImports: true |
| 67 | +KeepEmptyLinesAtTheStartOfBlocks: false |
| 68 | +MacroBlockBegin: '' |
| 69 | +MacroBlockEnd: '' |
| 70 | +MaxEmptyLinesToKeep: 1 |
| 71 | +NamespaceIndentation: None |
| 72 | +ObjCBinPackProtocolList: Auto |
| 73 | +ObjCBlockIndentWidth: 8 |
| 74 | +ObjCSpaceAfterProperty: true |
| 75 | +ObjCSpaceBeforeProtocolList: true |
| 76 | + |
| 77 | +# Taken from git's rules |
| 78 | +PenaltyBreakAssignment: 10 |
| 79 | +PenaltyBreakBeforeFirstCallParameter: 30 |
| 80 | +PenaltyBreakComment: 10 |
| 81 | +PenaltyBreakFirstLessLess: 0 |
| 82 | +PenaltyBreakString: 10 |
| 83 | +PenaltyBreakTemplateDeclaration: 10 |
| 84 | +PenaltyExcessCharacter: 100 |
| 85 | +PenaltyReturnTypeOnItsOwnLine: 60 |
| 86 | + |
| 87 | +PointerAlignment: Right |
| 88 | +ReflowComments: false |
| 89 | +SortIncludes: true |
| 90 | +SortUsingDeclarations: true |
| 91 | +SpaceAfterCStyleCast: false |
| 92 | +SpaceAfterTemplateKeyword: true |
| 93 | +SpaceAfterLogicalNot: false |
| 94 | +#SpaceBeforeCaseColon: false |
| 95 | +SpaceBeforeAssignmentOperators: true |
| 96 | +SpaceBeforeCpp11BracedList: true |
| 97 | +SpaceBeforeCtorInitializerColon: true |
| 98 | +SpaceBeforeInheritanceColon: true |
| 99 | +SpaceBeforeParens: ControlStatements |
| 100 | +SpaceBeforeRangeBasedForLoopColon: true |
| 101 | +SpaceInEmptyParentheses: false |
| 102 | +SpacesBeforeTrailingComments: 1 |
| 103 | +SpacesInAngles: false |
| 104 | +SpacesInContainerLiterals: false |
| 105 | +SpacesInCStyleCastParentheses: false |
| 106 | +SpacesInParentheses: false |
| 107 | +SpacesInSquareBrackets: false |
| 108 | +IndentWidth: 4 |
| 109 | +TabWidth: 4 |
| 110 | +UseTab: Always |
| 111 | +ConstructorInitializerIndentWidth: 4 |
| 112 | +ContinuationIndentWidth: 4 |
| 113 | +ColumnLimit: 120 |
| 114 | +... |
0 commit comments