Debian Codegraph @

.clang-format

raw
1 # SPDX-License-Identifier: GPL-2.0
2 #
3 # clang-format configuration file. Intended for clang-format >= 11.
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: 80
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:]]*for_each[^[:space:]]*(' \
69 # | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
70 # | LC_ALL=C sort -u
71 ForEachMacros:
72 - 'fdt_for_each_property_offset'
73 - 'fdt_for_each_subnode'
74 - 'for_each_child'
75 - 'for_each_child_withdel'
76 - 'for_each_label'
77 - 'for_each_label_withdel'
78 - 'for_each_marker'
79 - 'for_each_marker_of_type'
80 - 'for_each_property'
81 - 'for_each_property_withdel'
82
83 IncludeBlocks: Preserve
84 IncludeCategories:
85 - Regex: '.*'
86 Priority: 1
87 IncludeIsMainRegex: '(Test)?$'
88 IndentCaseLabels: false
89 IndentGotoLabels: false
90 IndentPPDirectives: None
91 IndentWidth: 8
92 IndentWrappedFunctionNames: false
93 JavaScriptQuotes: Leave
94 JavaScriptWrapImports: true
95 KeepEmptyLinesAtTheStartOfBlocks: false
96 MacroBlockBegin: ''
97 MacroBlockEnd: ''
98 MaxEmptyLinesToKeep: 1
99 NamespaceIndentation: None
100 ObjCBinPackProtocolList: Auto
101 ObjCBlockIndentWidth: 8
102 ObjCSpaceAfterProperty: true
103 ObjCSpaceBeforeProtocolList: true
104
105 # Taken from git's rules
106 PenaltyBreakAssignment: 10
107 PenaltyBreakBeforeFirstCallParameter: 30
108 PenaltyBreakComment: 10
109 PenaltyBreakFirstLessLess: 0
110 PenaltyBreakString: 10
111 PenaltyExcessCharacter: 100
112 PenaltyReturnTypeOnItsOwnLine: 60
113
114 PointerAlignment: Right
115 ReflowComments: false
116 SortIncludes: false
117 SortUsingDeclarations: false
118 SpaceAfterCStyleCast: false
119 SpaceAfterTemplateKeyword: true
120 SpaceBeforeAssignmentOperators: true
121 SpaceBeforeCtorInitializerColon: true
122 SpaceBeforeInheritanceColon: true
123 SpaceBeforeParens: ControlStatementsExceptForEachMacros
124 SpaceBeforeRangeBasedForLoopColon: true
125 SpaceInEmptyParentheses: false
126 SpacesBeforeTrailingComments: 1
127 SpacesInAngles: false
128 SpacesInContainerLiterals: false
129 SpacesInCStyleCastParentheses: false
130 SpacesInParentheses: false
131 SpacesInSquareBrackets: false
132 Standard: Cpp03
133 TabWidth: 8
134 UseTab: Always
135 ...