blob: 5f9346526ef7c1c3990b0d7c56176b178e27a5ca [file] [log] [blame]
Jakub Sujak6e56bf32023-08-23 14:42:26 +01001# Copyright (c) 2017, 2023 Arm Limited.
2#
3# SPDX-License-Identifier: MIT
4#
5# Permission is hereby granted, free of charge, to any person obtaining a copy
6# of this software and associated documentation files (the "Software"), to
7# deal in the Software without restriction, including without limitation the
8# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9# sell copies of the Software, and to permit persons to whom the Software is
10# furnished to do so, subject to the following conditions:
11#
12# The above copyright notice and this permission notice shall be included in all
13# copies or substantial portions of the Software.
14#
15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21# SOFTWARE.
Anthony Barbier6ff3b192017-09-04 18:44:23 +010022---
23Language: Cpp
Jakub Sujak6e56bf32023-08-23 14:42:26 +010024BasedOnStyle: LLVM
25Standard: c++14
26ColumnLimit: 120
27
28# Override LLVM style options
29AccessModifierOffset: -4
Anthony Barbier6ff3b192017-09-04 18:44:23 +010030AlignAfterOpenBracket: Align
Jakub Sujak6e56bf32023-08-23 14:42:26 +010031AlignConsecutiveAssignments: Consecutive
32AlignConsecutiveBitFields: Consecutive
33AlignConsecutiveDeclarations: Consecutive
34AlignConsecutiveMacros: Consecutive
35AlignEscapedNewlines: Left
Anthony Barbier6ff3b192017-09-04 18:44:23 +010036AllowShortFunctionsOnASingleLine: None
Jakub Sujak6e56bf32023-08-23 14:42:26 +010037AlwaysBreakTemplateDeclarations: Yes
38BinPackParameters: false
39BraceWrapping:
40 AfterCaseLabel: true
41 AfterClass: true
42 AfterControlStatement: Always
43 AfterEnum: true
44 AfterFunction: true
45 AfterNamespace: true
46 AfterObjCDeclaration: true
47 AfterStruct: true
48 AfterUnion: true
49 AfterExternBlock: false
50 BeforeCatch: true
51 BeforeElse: true
52 BeforeLambdaBody: true
53 BeforeWhile: false
54 IndentBraces: false
55 SplitEmptyFunction: true
56 SplitEmptyRecord: true
57 SplitEmptyNamespace: true
58BreakBeforeBraces: Custom
59IndentCaseLabels: true
60IndentExternBlock: AfterExternBlock
61IndentWidth: 4
62KeepEmptyLinesAtTheStartOfBlocks: false
63PackConstructorInitializers: NextLine
64ReflowComments: false
65
66# Includes order
67SortIncludes: CaseInsensitive
68IncludeBlocks: Regroup
69IncludeCategories:
70 # Project headers
71 - Regex: '^"(arm_compute|ckw)/'
72 Priority: 1
73 SortPriority: 1
74 # Third-party headers
75 - Regex: '^"(cl|opencl|half|npy|stb)/'
76 Priority: 2
77 SortPriority: 2
78 # Private headers
79 - Regex: '^"(src|tests|examples|utils|support)/'
80 Priority: 3
81 SortPriority: 3
82 # System headers
83 - Regex: '.*'
84 Priority: 10
85 SortPriority: 10