Debian Codegraph @

backends/apt/.clang-format

raw
1 ---
2 BasedOnStyle: LLVM
3 IndentWidth: 4
4 ColumnLimit: 120
5 PointerAlignment: Right
6 AlignAfterOpenBracket: AlwaysBreak
7 AllowAllParametersOfDeclarationOnNextLine: false
8 AlwaysBreakBeforeMultilineStrings: true
9 BreakBeforeBinaryOperators: NonAssignment
10 AlignArrayOfStructures: Left
11 BreakBeforeBraces: Linux
12
13 # never sort includes, only regroup (in rare cases)
14 IncludeBlocks: Regroup
15 SortIncludes: Never
16
17 # Allow arguments to be on their own lines
18 AllowAllArgumentsOnNextLine: false
19
20 ---
21 Language: C
22 AlwaysBreakAfterReturnType: AllDefinitions
23 SpaceBeforeParens: Always
24
25 # we abuse this to make clang-format not touch g_auto* macros,
26 # as these should not have a space inserted before their open bracket
27 WhitespaceSensitiveMacros: ['g_autoptr', 'g_auto', '_', '__attribute__', 'G_DEFINE_QUARK']
28 ---
29 Language: Cpp
30 Standard: C++11
31
32 # format C++11 braced lists like function calls
33 Cpp11BracedListStyle: true
34
35 # do not put a space before C++11 braced lists
36 SpaceBeforeCpp11BracedList: false
37
38 # no namespace indentation to keep indent level low
39 NamespaceIndentation: None
40
41 # we use template< without space.
42 SpaceAfterTemplateKeyword: false
43
44 # Always break after template declaration
45 AlwaysBreakTemplateDeclarations: true
46
47 # keep lambda formatting multi-line if not empty
48 AllowShortLambdasOnASingleLine: Empty
49
50 # return types should not be on their own lines
51 AlwaysBreakAfterReturnType: None
52 PenaltyReturnTypeOnItsOwnLine: 1000
53 AlwaysBreakAfterDefinitionReturnType: None
54
55 # Break constructor initializers before the colon and after the commas,
56 # and never put the all in one line.
57 BreakConstructorInitializers: BeforeColon
58 BreakInheritanceList: BeforeColon
59 PackConstructorInitializers: Never
60
61 # Place ternary operators after line breaks
62 BreakBeforeTernaryOperators: true
63
64 # No own indentation level for access modifiers
65 IndentAccessModifiers: false
66 AccessModifierOffset: -4
67
68 # Add empty line only when access modifier starts a new logical block.
69 EmptyLineBeforeAccessModifier: LogicalBlock
70
71 # Only merge empty functions.
72 AllowShortFunctionsOnASingleLine: Empty
73
74 # Don't indent case labels.
75 IndentCaseLabels: false
76
77 # No space after C-style cast
78 SpaceAfterCStyleCast: false
79
80 # Never pack arguments or parameters
81 BinPackArguments: false
82 BinPackParameters: false
83
84 # Avoid breaking around an assignment operator
85 PenaltyBreakAssignment: 150
86
87 # Left-align newline escapes, e.g. in macros
88 AlignEscapedNewlines: Left
89
90 # Enums should be one entry per line
91 AllowShortEnumsOnASingleLine: false
92
93 # we want consecutive macros to be aligned
94 AlignConsecutiveMacros: true