Debian Codegraph @

_clang-format

raw
1 # Copyright (C) 2016 Olivier Goffart <[email protected]>
2 #
3 # You may use this file under the terms of the 3-clause BSD license.
4 # See the file LICENSE from this package for details.
5
6 ---
7 BasedOnStyle: WebKit
8
9 Standard: Cpp11
10
11 ColumnLimit: 240
12 # How much weight do extra characters after the line length limit have.
13 # PenaltyExcessCharacter: 4
14
15 # Disable reflow of qdoc comments: indentation rules are different.
16 # Translation comments are also excluded.
17 CommentPragmas: "^!|^:"
18
19 # We want a space between the type and the star for pointer types.
20 PointerBindsToType: false
21
22 # We use template< without space.
23 SpaceAfterTemplateKeyword: false
24
25 # We want to break before the operators, but not before a '='.
26 BreakBeforeBinaryOperators: NonAssignment
27
28 # Braces are usually attached, but not after functions or class declarations.
29 BreakBeforeBraces: Custom
30 BraceWrapping:
31 AfterClass: true
32 AfterControlStatement: false
33 AfterEnum: true
34 AfterFunction: true
35 AfterNamespace: false
36 AfterObjCDeclaration: false
37 AfterStruct: true
38 AfterUnion: false
39 BeforeCatch: false
40 BeforeElse: false
41 IndentBraces: false
42
43 # When constructor initializers do not fit on one line, put them each on a new line.
44 ConstructorInitializerAllOnOneLineOrOnePerLine: true
45 # Indent initializers by 4 spaces
46 ConstructorInitializerIndentWidth: 4
47
48 # Indent width for line continuations.
49 ContinuationIndentWidth: 8
50
51 # No indentation for namespaces.
52 NamespaceIndentation: None
53
54 # Allow indentation for preprocessing directives (if/ifdef/endif). https://reviews.llvm.org/rL312125
55 IndentPPDirectives: AfterHash
56
57 # Horizontally align arguments after an open bracket.
58 # The coding style does not specify the following, but this is what gives
59 # results closest to the existing code.
60 AlignAfterOpenBracket: true
61 AlwaysBreakTemplateDeclarations: true
62
63 # Ideally we should also allow less short function in a single line, but
64 # clang-format does not handle that.
65 AllowShortFunctionsOnASingleLine: Inline
66
67 # The coding style specifies some include order categories, but also tells to
68 # separate categories with an empty line. It does not specify the order within
69 # the categories. Since the SortInclude feature of clang-format does not
70 # re-order includes separated by empty lines, the feature is not used.
71 SortIncludes: false
72
73 # macros for which the opening brace stays attached.
74 ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH, forever, Q_FOREVER, QBENCHMARK, QBENCHMARK_ONCE ]
75
76 # Break constructor initializers before the colon and after the commas.
77 BreakConstructorInitializers: BeforeColon