Jack Rosenthal | 90e3d71 | 2019-11-08 14:42:31 -0700 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | # |
| 3 | # clang-format configuration file. Intended for clang-format >= 9. |
| 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 | # Note: imported from Kernel .clang-format, uncommented options that |
| 12 | # require clang-format-4.0 or clang-format-5.0, and removed |
| 13 | # kernel-specific macros. |
| 14 | --- |
| 15 | AccessModifierOffset: -4 |
| 16 | AlignAfterOpenBracket: Align |
| 17 | AlignConsecutiveAssignments: false |
| 18 | AlignConsecutiveDeclarations: false |
| 19 | AlignEscapedNewlines: Left |
| 20 | AlignOperands: true |
| 21 | AlignTrailingComments: false |
| 22 | AllowAllParametersOfDeclarationOnNextLine: false |
| 23 | AllowShortBlocksOnASingleLine: false |
| 24 | AllowShortCaseLabelsOnASingleLine: false |
| 25 | AllowShortFunctionsOnASingleLine: None |
Raul E Rangel | 88dd3f7 | 2018-04-03 14:55:57 -0600 | [diff] [blame] | 26 | AllowShortIfStatementsOnASingleLine: false |
Jack Rosenthal | 90e3d71 | 2019-11-08 14:42:31 -0700 | [diff] [blame] | 27 | AllowShortLoopsOnASingleLine: false |
| 28 | AlwaysBreakAfterDefinitionReturnType: None |
| 29 | AlwaysBreakAfterReturnType: None |
| 30 | AlwaysBreakBeforeMultilineStrings: false |
| 31 | AlwaysBreakTemplateDeclarations: false |
| 32 | BinPackArguments: true |
| 33 | BinPackParameters: true |
| 34 | BraceWrapping: |
| 35 | AfterClass: false |
| 36 | AfterControlStatement: false |
| 37 | AfterEnum: false |
| 38 | AfterFunction: true |
| 39 | AfterNamespace: true |
| 40 | AfterObjCDeclaration: false |
| 41 | AfterStruct: false |
| 42 | AfterUnion: false |
| 43 | AfterExternBlock: false |
| 44 | BeforeCatch: false |
| 45 | BeforeElse: false |
| 46 | IndentBraces: false |
| 47 | SplitEmptyFunction: true |
| 48 | SplitEmptyRecord: true |
| 49 | SplitEmptyNamespace: true |
| 50 | BreakBeforeBinaryOperators: None |
| 51 | BreakBeforeBraces: Custom |
| 52 | BreakBeforeInheritanceComma: false |
| 53 | BreakBeforeTernaryOperators: false |
| 54 | BreakConstructorInitializersBeforeComma: false |
| 55 | BreakConstructorInitializers: BeforeComma |
| 56 | BreakAfterJavaFieldAnnotations: false |
| 57 | BreakStringLiterals: false |
| 58 | ColumnLimit: 80 |
| 59 | CommentPragmas: '^ IWYU pragma:' |
| 60 | CompactNamespaces: false |
| 61 | ConstructorInitializerAllOnOneLineOrOnePerLine: false |
| 62 | ConstructorInitializerIndentWidth: 8 |
| 63 | ContinuationIndentWidth: 8 |
| 64 | Cpp11BracedListStyle: false |
| 65 | DerivePointerAlignment: false |
| 66 | DisableFormat: false |
| 67 | ExperimentalAutoDetectBinPacking: false |
| 68 | FixNamespaceComments: false |
| 69 | IncludeBlocks: Preserve |
| 70 | IncludeCategories: |
| 71 | - Regex: '.*' |
| 72 | Priority: 1 |
| 73 | IncludeIsMainRegex: '(Test)?$' |
Raul E Rangel | 88dd3f7 | 2018-04-03 14:55:57 -0600 | [diff] [blame] | 74 | IndentCaseLabels: false |
Jack Rosenthal | 90e3d71 | 2019-11-08 14:42:31 -0700 | [diff] [blame] | 75 | IndentPPDirectives: None |
| 76 | IndentWidth: 8 |
| 77 | IndentWrappedFunctionNames: false |
| 78 | JavaScriptQuotes: Leave |
| 79 | JavaScriptWrapImports: true |
| 80 | KeepEmptyLinesAtTheStartOfBlocks: false |
| 81 | MacroBlockBegin: '' |
| 82 | MacroBlockEnd: '' |
| 83 | MaxEmptyLinesToKeep: 1 |
| 84 | NamespaceIndentation: Inner |
| 85 | ObjCBinPackProtocolList: Auto |
| 86 | ObjCBlockIndentWidth: 8 |
| 87 | ObjCSpaceAfterProperty: true |
| 88 | ObjCSpaceBeforeProtocolList: true |
| 89 | |
| 90 | # Taken from git's rules |
| 91 | PenaltyBreakAssignment: 10 |
| 92 | PenaltyBreakBeforeFirstCallParameter: 30 |
| 93 | PenaltyBreakComment: 10 |
| 94 | PenaltyBreakFirstLessLess: 0 |
| 95 | PenaltyBreakString: 10 |
| 96 | PenaltyExcessCharacter: 100 |
| 97 | PenaltyReturnTypeOnItsOwnLine: 60 |
| 98 | |
| 99 | PointerAlignment: Right |
| 100 | ReflowComments: false |
| 101 | SortIncludes: false |
| 102 | SortUsingDeclarations: false |
| 103 | SpaceAfterCStyleCast: false |
| 104 | SpaceAfterTemplateKeyword: true |
| 105 | SpaceBeforeAssignmentOperators: true |
| 106 | SpaceBeforeCtorInitializerColon: true |
| 107 | SpaceBeforeInheritanceColon: true |
| 108 | SpaceBeforeParens: ControlStatements |
| 109 | SpaceBeforeRangeBasedForLoopColon: true |
| 110 | SpaceInEmptyParentheses: false |
| 111 | SpacesBeforeTrailingComments: 1 |
| 112 | SpacesInAngles: false |
| 113 | SpacesInContainerLiterals: false |
| 114 | SpacesInCStyleCastParentheses: false |
| 115 | SpacesInParentheses: false |
| 116 | SpacesInSquareBrackets: false |
| 117 | Standard: Cpp03 |
| 118 | TabWidth: 8 |
| 119 | UseTab: Always |