Debian Codegraph @

.clang-format

raw
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # clang-format configuration file. Intended for clang-format >= 12.
4 #
5 # For more information, see:
6 #
7 # Documentation/dev-tools/clang-format.rst
8 # https://clang.llvm.org/docs/ClangFormat.html
9 # https://clang.llvm.org/docs/ClangFormatStyleOptions.html
10 #
11 ---
12 AccessModifierOffset: -4
13 AlignAfterOpenBracket: Align
14 AlignConsecutiveAssignments: false
15 AlignConsecutiveDeclarations: false
16 AlignEscapedNewlines: Left
17 AlignOperands: true
18 AlignTrailingComments: false
19 AllowAllParametersOfDeclarationOnNextLine: false
20 AllowShortBlocksOnASingleLine: false
21 AllowShortCaseLabelsOnASingleLine: false
22 AllowShortFunctionsOnASingleLine: None
23 AllowShortIfStatementsOnASingleLine: false
24 AllowShortLoopsOnASingleLine: false
25 AlwaysBreakAfterDefinitionReturnType: None
26 AlwaysBreakAfterReturnType: None
27 AlwaysBreakBeforeMultilineStrings: false
28 AlwaysBreakTemplateDeclarations: false
29 BinPackArguments: true
30 BinPackParameters: true
31 BraceWrapping:
32 AfterClass: false
33 AfterControlStatement: false
34 AfterEnum: false
35 AfterFunction: true
36 AfterNamespace: true
37 AfterObjCDeclaration: false
38 AfterStruct: false
39 AfterUnion: false
40 AfterExternBlock: false
41 BeforeCatch: false
42 BeforeElse: false
43 IndentBraces: false
44 SplitEmptyFunction: true
45 SplitEmptyRecord: true
46 SplitEmptyNamespace: true
47 BreakBeforeBinaryOperators: None
48 BreakBeforeBraces: Custom
49 BreakBeforeInheritanceComma: false
50 BreakBeforeTernaryOperators: false
51 BreakConstructorInitializersBeforeComma: false
52 BreakConstructorInitializers: BeforeComma
53 BreakAfterJavaFieldAnnotations: false
54 BreakStringLiterals: false
55 ColumnLimit: 90
56 CommentPragmas: '^ IWYU pragma:'
57 CompactNamespaces: false
58 ConstructorInitializerAllOnOneLineOrOnePerLine: false
59 ConstructorInitializerIndentWidth: 8
60 ContinuationIndentWidth: 8
61 Cpp11BracedListStyle: false
62 DerivePointerAlignment: false
63 DisableFormat: false
64 ExperimentalAutoDetectBinPacking: false
65 FixNamespaceComments: false
66
67 # Taken from:
68 # git grep -h '^#define [^[:space:]]*foreach[^[:space:]]*(' \
69 # | sed "s,^#define \([^[:space:]]*foreach[^[:space:]]*\)(.*$, - '\1'," \
70 # | LC_ALL=C sort -u
71 ForEachMacros:
72 - 'kmod_list_foreach'
73 - 'kmod_list_foreach_reverse'
74
75 # Taken from:
76 # git grep -h '^#define .*__attribute__' \
77 # | cut -d' ' -f2 \
78 # | sed -e 's/(.*//' -e 's/^/ - /' \
79 # | LC_ALL=C sort -u
80 AttributeMacros:
81 - KMOD_EXPORT
82 - TS_EXPORT
83 - _aligned_
84 - _alignedptr_
85 - _always_inline_
86 - _cleanup_
87 - _must_check_
88 - _nonnull_
89 - _nonnull_all_
90 - _printf_format_
91 - _section_
92 - noreturn
93
94 IncludeBlocks: Preserve
95 IncludeCategories:
96 - Regex: '.*'
97 Priority: 1
98 IncludeIsMainRegex: '(Test)?$'
99 IndentCaseLabels: false
100 IndentGotoLabels: false
101 IndentPPDirectives: None
102 IndentWidth: 8
103 IndentWrappedFunctionNames: false
104 JavaScriptQuotes: Leave
105 JavaScriptWrapImports: true
106 KeepEmptyLinesAtTheStartOfBlocks: false
107 MacroBlockBegin: ''
108 MacroBlockEnd: ''
109 MaxEmptyLinesToKeep: 1
110 NamespaceIndentation: None
111 ObjCBinPackProtocolList: Auto
112 ObjCBlockIndentWidth: 8
113 ObjCSpaceAfterProperty: true
114 ObjCSpaceBeforeProtocolList: true
115
116 # Taken from git's rules
117 PenaltyBreakAssignment: 10
118 PenaltyBreakBeforeFirstCallParameter: 100
119 PenaltyBreakComment: 10
120 PenaltyBreakFirstLessLess: 0
121 PenaltyBreakString: 10
122 PenaltyExcessCharacter: 50
123 PenaltyReturnTypeOnItsOwnLine: 110
124
125 PointerAlignment: Right
126 ReflowComments: false
127 SortIncludes: false
128 SortUsingDeclarations: false
129 SpaceAfterCStyleCast: false
130 SpaceAfterTemplateKeyword: true
131 SpaceBeforeAssignmentOperators: true
132 SpaceBeforeCtorInitializerColon: true
133 SpaceBeforeInheritanceColon: true
134 SpaceBeforeParens: ControlStatementsExceptForEachMacros
135 SpaceBeforeRangeBasedForLoopColon: true
136 SpaceInEmptyParentheses: false
137 SpacesBeforeTrailingComments: 1
138 SpacesInAngles: false
139 SpacesInContainerLiterals: false
140 SpacesInCStyleCastParentheses: false
141 SpacesInParentheses: false
142 SpacesInSquareBrackets: false
143 Standard: Cpp03
144 TabWidth: 8
145 UseTab: Always
146 ...