forked from eclipse-iceoryx/iceoryx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
148 lines (141 loc) · 5.8 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
# NOTE: following checks are disabled, because they have duplicates in other group:
#
# - readability-magic-numbers (duplicate of cppcoreguidelines-avoid-magic-numbers)
# - hicpp-no-malloc (duplicate of cppcoreguidelines-no-malloc)
# - hicpp-member-init (duplicate of cppcoreguidelines-pro-type-member-init)
# - performance-move-const-arg (duplicate of hicpp-move-const-arg)
# - bugprone-use-after-move (duplicate of hicpp-move-const-arg)
Checks: '
-*,
readability-*,
clang-analyzer-*,
cert-*,
bugprone-*,
cppcoreguidelines-*,
concurrency-*,
performance-*,
hicpp-*,
-bugprone-use-after-move,
-bugprone-easily-swappable-parameters,
-bugprone-branch-clone,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-not-null-terminated-result,
-concurrency-mt-unsafe,
-readability-named-parameter,
-readability-avoid-const-params-in-decls,
-readability-else-after-return,
-readability-redundant-access-specifiers,
-readability-magic-numbers,
-readability-function-size,
-readability-static-accessed-through-instance,
-readability-qualified-auto,
-readability-uppercase-literal-suffix,
-readability-implicit-bool-conversion,
-readability-convert-member-functions-to-static,
-readability-inconsistent-declaration-parameter-name,
-readability-container-size-empty,
-readability-simplify-boolean-expr,
-readability-make-member-function-const,
-readability-const-return-type,
-readability-function-cognitive-complexity,
-readability-use-anyofallof,
-hicpp-named-parameter,
-hicpp-avoid-c-arrays,
-hicpp-no-array-decay,
-hicpp-signed-bitwise,
-hicpp-vararg,
-hicpp-no-malloc,
-hicpp-member-init,
-hicpp-use-auto,
-hicpp-uppercase-literal-suffix,
-hicpp-use-equals-default,
-hicpp-deprecated-headers,
-cert-env33-c,
-performance-move-const-arg,
-performance-no-int-to-ptr,
-performance-unnecessary-value-param,
-performance-for-range-copy,
-clang-analyzer-core.uninitialized.UndefReturn,
-clang-analyzer-optin.cplusplus.VirtualCall,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-init-variables,
-hicpp-move-const-arg,
-hicpp-invalid-access-moved'
## Those warnings should be enabled
## They are disabled since they require a heavy API refactoring and when we enable it we clutter the code with // NOLINT comments
# -bugprone-easily-swappable-parameters
#
## the LineThreshold, StatementThreshold, BranchThreshold contains random number
## here we have to do some heavy refactoring
# -readability-function-size
# -readability-function-cognitive-complexity
#
## is it working correctly? produces hard to understand warning
# -clang-analyzer-core.uninitialized.UndefReturn
# -clang-analyzer-optin.cplusplus.VirtualCall
#
###########################################
#### A lot of code changes but easy effort:
###########################################
# -readability-qualified-auto
# -readability-convert-member-functions-to-static
# -readability-container-size-empty
# -readability-simplify-boolean-expr
# -readability-const-return-type
# -readability-use-anyofallof
# -cppcoreguidelines-avoid-magic-numbers
# -cppcoreguidelines-init-variables
# -hicpp-use-auto
# -readability-qualified-auto
# -hicpp-uppercase-literal-suffix
# -readability-uppercase-literal-suffix
# -readability-implicit-bool-conversion
# -bugprone-branch-clone
# -hicpp-use-equals-default
# -hicpp-deprecated-headers
# -cppcoreguidelines-prefer-member-initializer
# -readability-convert-member-functions-to-static
# -cppcoreguidelines-pro-type-const-cast
# -cppcoreguidelines-pro-type-member-init
# -bugprone-implicit-widening-of-multiplication-result
# -readability-inconsistent-declaration-parameter-name
# -performance-for-range-copy
# -readability-make-member-function-const
WarningsAsErrors: '' # Treat all Checks from above as errors
HeaderFilterRegex: ''
FormatStyle: file
InheritParentConfig: false
# ToDo iox-#889: re-enable the following tests:
# -hicpp-move-const-arg
# -hicpp-invalid-access-moved
CheckOptions:
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.EnumCase, value: CamelCase }
- { key: readability-identifier-naming.StructCase, value: CamelCase }
- { key: readability-identifier-naming.UnionCase, value: CamelCase }
- { key: readability-identifier-naming.MethodCase, value: camelBack }
- { key: readability-identifier-naming.FunctionCase, value: camelBack }
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
- { key: readability-identifier-naming.PrivateMemberPrefix, value: m_ }
- { key: readability-identifier-naming.ProtectedMemberPrefix, value: m_ }
- { key: readability-identifier-naming.MemberCase, value: camelBack }
- { key: readability-identifier-naming.ConstexprVariableCase, value: UPPER_CASE }
- { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE }
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }
- { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase }
- { key: readability-function-size.LineThreshold, value: 200 }
- { key: readability-function-size.StatementThreshold, value: 200 }
- { key: readability-function-size.BranchThreshold, value: 10 }
- { key: readability-function-size.ParameterThreshold, value: 3 }