-
Notifications
You must be signed in to change notification settings - Fork 32
/
.clang-tidy
189 lines (180 loc) · 7.33 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# This settings file for clang-tidy chooses which checks to run, the settings
# for those checks, etc. It uses as many of the default values as possible and
# runs all checks with some exclusions by default.
#
# The full list of clang-tidy 17 checks and documentation can be found
# [here](https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/clang-tidy/index.html)
#
# The "Checks" command should have 5 sections seperated by a newline:
# 1. Turn on all checks by default. Done with "*"
# 2. Turn off the catagories of checks we don't want
# 3. Turn off specific, individual checks we don't want
# 4. Turn on checks that we do want from from the catagories of checks that we
# didn't want
# 5. Turn off the checks that we do want but that aren't passing yet
---
Checks: "*,
-abseil-*,
-altera-*,
-android-*,
-boost-*,
-darwin-*,
-fuchsia-*,
-linuxkernel-*,
-llvmlibc-*,
-*objc*,
-*osx*,
-zircon-*,
-bugprone-easily-swappable-parameters,
-modernize-use-trailing-return-type,
-readability-avoid-const-params-in-decls,
-readability-static-accessed-through-instance,
-misc-unused-parameters,
-hicpp-multiway-paths-covered,
-cert-err58-cpp,
-cert-dcl37-c,
-cert-dcl51-cpp,
-cppcoreguidelines-pro-bounds-constant-array-index,
-google-readability-braces-around-statements,
-hicpp-braces-around-statements,
google-readability-avoid-underscore-in-googletest-name,
google-upgrade-googletest-case,
-bugprone-empty-catch,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-narrowing-conversions,
-bugprone-switch-missing-default-case,
-cert-env33-c,
-cert-err33-c,
-cert-err34-c,
-cert-msc32-c,
-cert-msc51-cpp,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-core.NullDereference,
-clang-analyzer-core.UndefinedBinaryOperatorResult,
-clang-analyzer-core.uninitialized.ArraySubscript,
-clang-analyzer-core.uninitialized.UndefReturn,
-clang-analyzer-deadcode.DeadStores,
-clang-analyzer-optin.performance.Padding,
-clang-analyzer-security.insecureAPI.strcpy,
-clang-diagnostic-format,
-clang-diagnostic-logical-not-parentheses,
-clang-diagnostic-macro-redefined,
-clang-diagnostic-unknown-cuda-version,
-clang-diagnostic-unused-command-line-argument,
-clang-diagnostic-unused-result,
-concurrency-mt-unsafe,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-const-or-ref-data-members,
-cppcoreguidelines-avoid-do-while,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-explicit-virtual-functions,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-cstyle-cast,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
-cppcoreguidelines-use-default-member-init,
-cppcoreguidelines-virtual-class-destructor,
-google-explicit-constructor,
-google-global-names-in-headers,
-google-readability-casting,
-google-readability-namespace-comments,
-google-readability-todo,
-google-runtime-int,
-hicpp-avoid-c-arrays,
-hicpp-deprecated-headers,
-hicpp-explicit-conversions,
-hicpp-member-init,
-hicpp-no-array-decay,
-hicpp-no-malloc,
-hicpp-special-member-functions,
-hicpp-use-auto,
-hicpp-use-equals-default,
-hicpp-use-noexcept,
-hicpp-use-nullptr,
-hicpp-use-override,
-hicpp-vararg,
-llvm-else-after-return,
-llvm-header-guard,
-llvm-include-order,
-llvm-namespace-comment,
-misc-const-correctness,
-misc-header-include-cycle,
-misc-include-cleaner,
-misc-non-private-member-variables-in-classes,
-misc-use-anonymous-namespace,
-modernize-avoid-c-arrays,
-modernize-deprecated-headers,
-modernize-macro-to-enum,
-modernize-redundant-void-arg,
-modernize-type-traits,
-modernize-type-traits,
-modernize-use-auto,
-modernize-use-default-member-init,
-modernize-use-equals-default,
-modernize-use-nodiscard,
-modernize-use-noexcept,
-modernize-use-nullptr,
-modernize-use-override,
-modernize-use-using,
-openmp-use-default-none,
-performance-avoid-endl,
-performance-unnecessary-value-param,
-readability-container-size-empty,
-readability-convert-member-functions-to-static,
-readability-delete-null-pointer,
-readability-duplicate-include,
-readability-else-after-return,
-readability-function-cognitive-complexity,
-readability-identifier-length,
-readability-implicit-bool-conversion,
-readability-inconsistent-declaration-parameter-name,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-make-member-function-const,
-readability-non-const-parameter,
-readability-redundant-control-flow,
-readability-redundant-preprocessor,
-readability-suspicious-call-argument"
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
FormatStyle: 'file'
UseColor: false
CheckOptions:
readability-braces-around-statements.ShortStatementLines: 1
# readability-identifier-naming allowed casing types
# - lower_case
# - UPPER_CASE
# - camelBack
# - CamelCase
# - camel_Snake_Back
# - Camel_Snake_Case
# - aNy_CasE
# readability-identifier-naming.VariableCase: 'lower_case'
# readability-identifier-naming.FunctionCase: 'Camel_Snake_Case'
readability-identifier-naming.NamespaceCase: 'lower_case'
# readability-identifier-naming.MacroDefinitionCase: 'UPPER_CASE'
# readability-identifier-naming.TypedefCase: 'CamelCase'
# readability-identifier-naming.TypeAliasCase: 'CamelCase'
readability-identifier-naming.EnumCase: 'CamelCase'
# readability-identifier-naming.ConstantCase: 'lower_case'
# readability-identifier-naming.ConstantPrefix: 'k_'
# readability-identifier-naming.GlobalVariablePrefix: 'g_'
readability-identifier-naming.ClassCase: 'CamelCase'
# readability-identifier-naming.MemberCase: 'lower_case' # This entry might not be needed
# readability-identifier-naming.MethodCase: 'CamelCase' # This entry might not be needed
# readability-identifier-naming.PrivateMemberSuffix: '_'
# readability-identifier-naming.PrivateMethodSuffix: '_'
hicpp-signed-bitwise.IgnorePositiveIntegerLiterals: 'true'
bugprone-reserved-identifier.AllowedIdentifiers: '__cudaSafeCall;__cudaCheckError;__shfl_down;__CHOLLA_PRETTY_FUNC__'
...