-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.clang-tidy
173 lines (161 loc) · 6.11 KB
/
.clang-tidy
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# Generated from CLion Inspection settings
---
Checks: >
-*,
mpi-*,
bugprone-*,
-bugprone-signal-handler,
-bugprone-narrowing-conversions,
-bugprone-redundant-branch-condition,
-bugprone-exception-escape,
-bugprone-multiple-new-in-one-expression,
-bugprone-unchecked-optional-access,
-bugprone-shared-ptr-array-mismatch,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-signed-char-misuse,
-bugprone-assignment-in-if-condition,
-bugprone-bool-pointer-implicit-conversion,
-bugprone-unhandled-exception-at-new,
-bugprone-unsafe-functions,
-bugprone-infinite-loop,
-bugprone-easily-swappable-parameters,
-bugprone-non-zero-enum-to-bool-conversion,
-bugprone-standalone-empty,
-bugprone-stringview-nullptr,
cert-err52-cpp,
cert-err60-cpp,
cert-err34-c,
cert-str34-c,
cert-dcl21-cpp,
cert-msc50-cpp,
cert-msc51-cpp,
cert-dcl58-cpp,
cert-flp30-c,
cppcoreguidelines-pro-type-member-init,
cppcoreguidelines-slicing,
cppcoreguidelines-interfaces-global-init,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-narrowing-conversions,
google-default-arguments,
google-runtime-operator,
google-explicit-constructor,
hicpp-multiway-paths-covered,
hicpp-exception-baseclass,
misc-unconventional-assign-operator,
misc-misplaced-const,
misc-new-delete-overloads,
misc-non-copyable-objects,
misc-no-recursion,
misc-throw-by-value-catch-by-reference,
misc-uniqueptr-reset-release,
modernize-*,
-modernize-use-trailing-return-type,
-modernize-avoid-c-arrays,
-modernize-type-traits,
-modernize-use-using,
-modernize-use-default-member-init,
-modernize-macro-to-enum,
openmp-use-default-none,
performance-*,
-performance-no-int-to-ptr,
-performance-avoid-endl,
portability-simd-intrinsics,
readability-*,
readability-identifier-naming,
readability-static-accessed-through-instance,
-readability-redundant-inline-specifier
-readability-redundant-preprocessor,
-readability-named-parameter,
-readability-function-size,
-readability-simplify-boolean-expr,
-readability-identifier-length,
-readability-duplicate-include,
-readability-magic-numbers,
-readability-braces-around-statements,
-readability-redundant-member-init,
-readability-suspicious-call-argument,
-readability-qualified-auto,
-readability-isolate-declaration,
-readability-uppercase-literal-suffix,
-readability-container-data-pointer,
-readability-else-after-return,
-readability-redundant-access-specifiers,
-readability-avoid-unconditional-preprocessor-if,
-readability-function-cognitive-complexity,
-readability-operators-representation,
-readability-implicit-bool-conversion,
-readability-container-contains,
-modernize-use-nodiscard
CheckOptions:
- key: readability-identifier-naming.ClassCase # 类名
value: CamelCase
- key: readability-identifier-naming.EnumCase # 枚举名
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase # 枚举值
value: UPPER_CASE
- key: readability-identifier-naming.ScopedEnumConstantCase # enum class 枚举值
value: UPPER_CASE
- key: readability-identifier-naming.UnionCase # 联合名
value: CamelCase
- key: readability-identifier-naming.MacroDefinitionCase # 宏名
value: UPPER_CASE
- key: readability-identifier-naming.TypeAliasCase # 类型别名
value: CamelCase
- key: readability-identifier-naming.TypedefCase # 类型定义
value: CamelCase, lower_case
- key: readability-identifier-naming.FunctionCase # 函数名
value: lower_case
- key: readability-identifier-naming.GlobalFunctionCase # 全局函数名
value: lower_case
- key: readability-identifier-naming.MethodCase # 成员函数名
value: lower_case
- key: readability-identifier-naming.PrivateMethodCase # 私有成员函数名
value: lower_case
- key: readability-identifier-naming.PrivateMethodPrefix # 私有成员函数名
value: _
- key: readability-identifier-naming.ClassMethodCase # 类方法名
value: lower_case
- key: readability-identifier-naming.VirtualMethodCase # 虚函数名
value: lower_case
- key: readability-identifier-naming.ClassConstantCase # 类常量 const
value: lower_case
- key: readability-identifier-naming.ClassConstantPrefix # 类常量前缀
value: k_
- key: readability-identifier-naming.ClassMemberCase # 类成员变量 static
value: lower_case
# - key: readability-identifier-naming.ClassMemberPrefix # 类成员变量前缀
# value: s_
- key: readability-identifier-naming.PublicMemberCase # 公有成员变量 public
value: lower_case
- key: readability-identifier-naming.MemberCase # 成员变量 default(public)
value: lower_case
- key: readability-identifier-naming.ProtectedMemberCase # 保护成员变量 protected
value: lower_case
- key: readability-identifier-naming.ProtectedMemberPrefix # 保护成员变量前缀
value: _
- key: readability-identifier-naming.PrivateMemberCase # 私有成员变量 private
value: lower_case
- key: readability-identifier-naming.PrivateMemberPrefix # 私有成员变量前缀
value: _
- key: readability-identifier-naming.ParameterCase # 函数参数
value: lower_case
- key: readability-identifier-naming.GlobalConstantCase # 全局常量
value: UPPER_CASE
- key: readability-identifier-naming.GlobalConstantPrefix # 全局常量前缀
value: k_
- key: readability-identifier-naming.ConstexprVariableCase # constexpr 变量
value: UPPER_CASE
- key: readability-identifier-naming.ConstexprVariablePrefix # constexpr 变量前缀
value: k_
- key: readability-identifier-naming.VariableCase # 变量
value: lower_case
- key: readability-identifier-naming.LocalVariableCase # 局部变量
value: lower_case
- key: readability-identifier-naming.LocalConstantCase # 局部常量
value: lower_case
- key: readability-identifier-naming.StaticVariableCase # 静态变量
value: lower_case
- key: readability-identifier-naming.TemplateParameterCase # 模板参数
value: CamelCase
- key: readability-identifier-naming.NamespaceCase # 命名空间
value: lower_case