Debian Codegraph @

.clang-format

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