xref: /oneTBB/examples/.clang-format (revision b15aabb3)
1# Copyright (c) 2020-2021 Intel Corporation
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15---
16Language: Cpp
17AccessModifierOffset: -4
18AlignAfterOpenBracket: Align
19AlignConsecutiveAssignments: false
20AlignConsecutiveDeclarations: false
21AlignConsecutiveMacros: true
22AlignEscapedNewlines: Left
23AlignOperands: true
24AlignTrailingComments: false
25AllowAllArgumentsOnNextLine: true
26AllowAllConstructorInitializersOnNextLine: false
27AllowAllParametersOfDeclarationOnNextLine: false
28AllowShortBlocksOnASingleLine: false
29AllowShortCaseLabelsOnASingleLine: true
30AllowShortFunctionsOnASingleLine: Empty
31AllowShortIfStatementsOnASingleLine: Never
32AllowShortLambdasOnASingleLine: Empty
33AllowShortLoopsOnASingleLine: false
34AlwaysBreakAfterDefinitionReturnType: None
35AlwaysBreakAfterReturnType: None
36AlwaysBreakBeforeMultilineStrings: false
37AlwaysBreakTemplateDeclarations: Yes
38BinPackArguments: false
39BinPackParameters: false
40BraceWrapping:
41  AfterCaseLabel: false
42  AfterClass: false
43  AfterControlStatement: false
44  AfterEnum: false
45  AfterFunction: false
46  AfterNamespace: false
47  AfterObjCDeclaration: false
48  AfterStruct: false
49  AfterUnion: false
50  AfterExternBlock: false
51  BeforeCatch: true
52  BeforeElse: true
53  IndentBraces: false
54  SplitEmptyFunction: false
55  SplitEmptyRecord: false
56  SplitEmptyNamespace: false
57BreakBeforeBinaryOperators: None
58BreakBeforeBraces: Custom
59BreakBeforeTernaryOperators: true
60BreakConstructorInitializers: BeforeColon
61BreakInheritanceList: BeforeColon
62BreakStringLiterals: false
63ColumnLimit: 100
64CommentPragmas: '^ IWYU pragma:'
65CompactNamespaces: false
66ConstructorInitializerAllOnOneLineOrOnePerLine: true
67ConstructorInitializerIndentWidth: 8
68ContinuationIndentWidth: 4
69Cpp11BracedListStyle: false
70DerivePointerAlignment: true
71DisableFormat: false
72FixNamespaceComments: true
73ForEachMacros:
74  - foreach
75  - Q_FOREACH
76  - BOOST_FOREACH
77IncludeBlocks: Preserve
78IncludeCategories:
79  - Regex:           '^<ext/.*\.h>'
80    Priority:        2
81  - Regex:           '^<.*\.h>'
82    Priority:        1
83  - Regex:           '^<.*'
84    Priority:        2
85  - Regex:           '.*'
86    Priority:        3
87IncludeIsMainRegex: '([-_](test|unittest))?$'
88IndentCaseLabels: true
89IndentPPDirectives: None
90IndentWidth: 4
91IndentWrappedFunctionNames: false
92KeepEmptyLinesAtTheStartOfBlocks: false
93MacroBlockBegin: ''
94MacroBlockEnd:   ''
95MaxEmptyLinesToKeep: 1
96NamespaceIndentation: None
97PenaltyBreakAssignment: 2
98PenaltyBreakBeforeFirstCallParameter: 1
99PenaltyBreakComment: 300
100PenaltyBreakFirstLessLess: 120
101PenaltyBreakString: 1000
102PenaltyBreakTemplateDeclaration: 10
103PenaltyExcessCharacter: 1000000
104PenaltyReturnTypeOnItsOwnLine: 200
105PointerAlignment: Left
106RawStringFormats:
107  - Language: Cpp
108    Delimiters:
109      - cc
110      - CC
111      - cpp
112      - Cpp
113      - CPP
114      - 'c++'
115      - 'C++'
116    CanonicalDelimiter: ''
117    BasedOnStyle: google
118  - Language: TextProto
119    Delimiters:
120      - pb
121      - PB
122      - proto
123      - PROTO
124    EnclosingFunctions:
125      - EqualsProto
126      - EquivToProto
127      - PARSE_PARTIAL_TEXT_PROTO
128      - PARSE_TEST_PROTO
129      - PARSE_TEXT_PROTO
130      - ParseTextOrDie
131      - ParseTextProtoOrDie
132    CanonicalDelimiter: ''
133    BasedOnStyle: google
134ReflowComments: false
135SortIncludes: false
136SortUsingDeclarations: false
137SpaceAfterCStyleCast: false
138SpaceAfterLogicalNot: false
139SpaceAfterTemplateKeyword: true
140SpaceBeforeAssignmentOperators: true
141SpaceBeforeCpp11BracedList: false
142SpaceBeforeCtorInitializerColon: true
143SpaceBeforeInheritanceColon: true
144SpaceBeforeParens: ControlStatements
145SpaceBeforeRangeBasedForLoopColon: true
146SpaceInEmptyParentheses: false
147SpacesBeforeTrailingComments: 1
148SpacesInAngles: false
149SpacesInContainerLiterals: false
150SpacesInCStyleCastParentheses: false
151SpacesInParentheses: false
152SpacesInSquareBrackets: false
153Standard: Cpp11
154StatementMacros:
155  - Q_UNUSED
156  - QT_REQUIRE_VERSION
157TabWidth: 1
158UseTab: Never
159...
160