forked from hw-native-sys/simpler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.clang-format
More file actions
136 lines (118 loc) · 3.67 KB
/
.clang-format
File metadata and controls
136 lines (118 loc) · 3.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Copyright (c) PyPTO Contributors.
# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
# CANN Open Software License Agreement Version 2.0 (the "License").
# Please refer to the License for details. You may not use this file except in compliance with the License.
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
# See LICENSE in the root of the software repository for the full text of the License.
# -----------------------------------------------------------------------------------------------------------
BasedOnStyle: LLVM
Language: Cpp
# --- Indentation ---
IndentWidth: 4
TabWidth: 4
UseTab: Never
ContinuationIndentWidth: 4
IndentCaseLabels: false
IndentPPDirectives: None
NamespaceIndentation: None
# --- Column limit ---
ColumnLimit: 120
# --- Pointer & reference ---
DerivePointerAlignment: false
PointerAlignment: Right
ReferenceAlignment: Right
# --- Braces ---
BreakBeforeBraces: Custom
BraceWrapping:
AfterCaseLabel: false
AfterClass: false
AfterControlStatement: Never
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
BeforeLambdaBody: false
BeforeWhile: false
IndentBraces: false
SplitEmptyFunction: false
SplitEmptyRecord: false
SplitEmptyNamespace: false
# --- Parameter packing & alignment ---
AlignAfterOpenBracket: BlockIndent
BinPackParameters: true
BinPackArguments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowAllArgumentsOnNextLine: true
# --- Short statements ---
AllowShortBlocksOnASingleLine: Empty
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: AllIfsAndElse
AllowShortLambdasOnASingleLine: Empty
AllowShortLoopsOnASingleLine: false
AllowShortEnumsOnASingleLine: true
AllowShortCaseLabelsOnASingleLine: false
# --- Alignment ---
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignConsecutiveMacros: false
AlignTrailingComments: true
AlignEscapedNewlines: Left
AlignOperands: Align
# --- Constructor initializers ---
BreakConstructorInitializers: AfterColon
PackConstructorInitializers: Never
# --- Inheritance ---
BreakInheritanceList: AfterComma
# --- Template ---
AlwaysBreakTemplateDeclarations: Yes
# --- Binary & ternary operators ---
BreakBeforeBinaryOperators: None
BreakBeforeTernaryOperators: false
# --- Includes ---
SortIncludes: Never
IncludeBlocks: Regroup
IncludeCategories:
- Regex: '^<.*>'
Priority: 3
- Regex: '^".*"'
Priority: 1
# --- Namespace ---
FixNamespaceComments: true
CompactNamespaces: false
# --- Spaces ---
SpaceBeforeParens: ControlStatements
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: Never
SpacesInCStyleCastParentheses: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# --- Empty lines ---
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
# --- Access modifier ---
AccessModifierOffset: -4
# --- Other ---
Cpp11BracedListStyle: true
BreakStringLiterals: true
ReflowComments: true
SortUsingDeclarations: true
InsertBraces: false
AlwaysBreakAfterReturnType: None