Debian Codegraph @

.clang-format

raw
1 ---
2 ---
3 # SPDX-FileCopyrightText: 2019 Christoph Cullmann <[email protected]>
4 # SPDX-FileCopyrightText: 2019 Gernot Gebhard <[email protected]>
5 #
6 # SPDX-License-Identifier: MIT
7
8 ---
9 Language: JavaScript
10 DisableFormat: true
11 ---
12
13 # Style for C++
14 Language: Cpp
15 Standard: c++20
16
17 # base is WebKit coding style: https://webkit.org/code-style-guidelines/
18 # below are only things set that diverge from this style!
19 BasedOnStyle: WebKit
20
21 # 4 spaces indent
22 TabWidth: 4
23
24 # No line limit
25 ColumnLimit: 0
26
27 # sort includes inside line separated groups
28 SortIncludes: true
29
30 # Braces are usually attached, but not after functions or class declarations.
31 BreakBeforeBraces: Custom
32 BraceWrapping:
33 AfterClass: true
34 AfterControlStatement: false
35 AfterEnum: false
36 AfterFunction: true
37 AfterNamespace: true
38 AfterObjCDeclaration: false
39 AfterStruct: true
40 AfterUnion: false
41 BeforeCatch: false
42 BeforeElse: false
43 IndentBraces: false
44
45 # CrlInstruction *a;
46 PointerAlignment: Right
47
48 # horizontally aligns arguments after an open bracket.
49 AlignAfterOpenBracket: Align
50
51 # don't move all parameters to new line
52 AllowAllParametersOfDeclarationOnNextLine: false
53
54 # no single line functions
55 AllowShortFunctionsOnASingleLine: None
56
57 # In case we have an if statement with multiple lines the operator should be at the beginning of the line
58 # but we do not want to break assignments
59 BreakBeforeBinaryOperators: NonAssignment
60
61 # format C++11 braced lists like function calls
62 Cpp11BracedListStyle: true
63
64 # do not put a space before C++11 braced lists
65 SpaceBeforeCpp11BracedList: false
66
67 # no namespace indentation to keep indent level low
68 NamespaceIndentation: None
69
70 # we use template< without space.
71 SpaceAfterTemplateKeyword: false
72
73 # Always break after template declaration
74 AlwaysBreakTemplateDeclarations: true
75
76 # macros for which the opening brace stays attached.
77 ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE , wl_resource_for_each, wl_resource_for_each_safe ]
78
79 # keep lambda formatting multi-line if not empty
80 AllowShortLambdasOnASingleLine: Empty
81
82 # We do not want clang-format to put all arguments on a new line
83 AllowAllArgumentsOnNextLine: false
84
85 # Indent lambdas to the start of the line, not to the start of the lambda
86 LambdaBodyIndentation: OuterScope
87
88 # Append trailing commas to enums
89 EnumTrailingComma: Insert
90
91 # We always add braces to if, while, and for statements
92 InsertBraces: true
93
94 # Insert trailing empty line at the end of file
95 InsertNewlineAtEOF: true
96
97 # Remove trailing commas from functions
98 RemoveSemicolon: true
99
100 # SIGNAL and SLOT expect normalized values, i.e. without whitespace
101 WhitespaceSensitiveMacros: [SIGNAL, SLOT]
102
103 # Add empty lines at the beginning and the end of namespace body
104 WrapNamespaceBodyWithEmptyLines: Always
105
106 # Avoid stray empty lines
107 KeepEmptyLines:
108 AtEndOfFile: false
109 AtStartOfBlock: false
110 AtStartOfFile: false
111
112 # Group class members and fields by access modifiers
113 EmptyLineBeforeAccessModifier: Always