Debian Codegraph @

.clang-format

raw
1 ---
2 # SPDX-FileCopyrightText: 2019 Christoph Cullmann <[email protected]>
3 # SPDX-FileCopyrightText: 2019 Gernot Gebhard <[email protected]>
4 # SPDX-FileCopyrightText: 2022 L. E. Segovia <[email protected]>
5 #
6 # SPDX-License-Identifier: MIT
7 #
8 # Based on ECM, Krita customizations are marked by KRITA: (all caps)
9 # See https://clang.llvm.org/docs/ClangFormatStyleOptions.html for the config options
10 # and https://community.kde.org/Policies/Frameworks_Coding_Style#Clang-format_automatic_code_formatting
11 # for clang-format tips & tricks
12 ---
13 Language: JavaScript
14 DisableFormat: true
15 ---
16
17 # Style for C++
18 Language: Cpp
19
20 # base is WebKit coding style: https://webkit.org/code-style-guidelines/
21 # below are only things set that diverge from this style!
22 BasedOnStyle: WebKit
23
24 # enforce C++11 (e.g. for std::vector<std::vector<lala>>
25 # KRITA: enforce C++14
26 Standard: c++14
27
28 # 4 spaces indent
29 TabWidth: 4
30
31 # 2 * 80 wide lines
32 # KRITA: shortened to 120
33 ColumnLimit: 120
34
35 # sort includes inside line separated groups
36 SortIncludes: true
37
38 # break before braces on function, namespace and class definitions.
39 BreakBeforeBraces: Linux
40
41 # CrlInstruction *a;
42 PointerAlignment: Right
43
44 # horizontally aligns arguments after an open bracket.
45 AlignAfterOpenBracket: Align
46
47 # don't move all parameters to new line
48 AllowAllParametersOfDeclarationOnNextLine: false
49
50 AllowShortEnumsOnASingleLine: false
51
52 # no single line functions
53 AllowShortFunctionsOnASingleLine: None
54
55 # always break before you encounter multi line strings
56 AlwaysBreakBeforeMultilineStrings: true
57
58 # don't move arguments to own lines if they are not all on the same
59 BinPackArguments: false
60
61 # don't move parameters to own lines if they are not all on the same
62 BinPackParameters: false
63
64 # In case we have an if statement with multiple lines the operator should be at the beginning of the line
65 # but we do not want to break assignments
66 BreakBeforeBinaryOperators: NonAssignment
67
68 # format C++11 braced lists like function calls
69 Cpp11BracedListStyle: true
70
71 # do not put a space before C++11 braced lists
72 SpaceBeforeCpp11BracedList: false
73
74 # remove empty lines
75 KeepEmptyLinesAtTheStartOfBlocks: false
76
77 # no namespace indentation to keep indent level low
78 NamespaceIndentation: None
79
80 # Automatically add a comment with the namespace name at the closing
81 # bracket of the namespace
82 FixNamespaceComments: true
83
84 # we use template< without space.
85 SpaceAfterTemplateKeyword: false
86
87 # Always break after template declaration
88 AlwaysBreakTemplateDeclarations: true
89
90 # macros for which the opening brace stays attached.
91 ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE , wl_resource_for_each, wl_resource_for_each_safe ]
92
93 # keep lambda formatting multi-line if not empty
94 AllowShortLambdasOnASingleLine: Empty
95
96 # Align limbdas against their signature lines
97 LambdaBodyIndentation: Signature
98
99 # We do not want clang-format to put all arguments on a new line
100 AllowAllArgumentsOnNextLine: false
101
102 # Don't format SPDX lines
103 CommentPragmas: ' SPDX-'