forked from widelands/widelands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
167 lines (167 loc) · 5.36 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
# See SUPPRESSED_CHECKS in utils/check_clang_tidy_results.py
# Also disable all aliases, because they only result in duplication of work,
# except for clang-analyzer-* aliases, which behave strange, so we treat them
# as normal checks.
#
# Alias list must be updated when clang-tidy version is bumped. Current list
# was taken from:
# https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/list.html
#
# TODO(tothxa): can be converted to "Checks: |" when lowest supported clang
# version reaches 15
Checks: >-
*,
-abseil*,
-altera*,
-android*,
-boost*,
-*fuchsia*,
-linuxkernel*,
-mpi-*,
-objc*,
-openmp*,
-*webkit*,
-zircon*,
-clang-analyzer-alpha*,
-COMMENT---cannot-clean-up-yet---,
-llvm-header-guard,
-cert-dcl50-cpp,
-cppcoreguidelines-pro-type-vararg,
-COMMENT---probably-not-for-us---,
-clang-analyzer-optin.mpi.MPI-Checker,
-cppcoreguidelines-avoid-goto,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-union-access,
-google-default-arguments,
-hicpp-avoid-goto,
-llvmlibc-callee-namespace,
-llvmlibc-implementation-in-namespace,
-llvmlibc-restrict-system-libc-headers,
-misc-non-private-member-variables-in-classes,
-misc-no-recursion,
-modernize-avoid-c-arrays,
-modernize-raw-string-literal,
-modernize-replace-disallow-copy-and-assign-macro,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-trailing-return-type,
-readability-identifier-length,
-readability-uppercase-literal-suffix,
-COMMENT---to-be-cleaned-up---,
-bugprone-easily-swappable-parameters,
-bugprone-exception-escape,
-bugprone-macro-parentheses,
-bugprone-narrowing-conversions,
-bugprone-not-null-terminated-result,
-bugprone-signed-char-misuse,
-bugprone-too-small-loop-variable,
-cert-err33-c,
-cert-err58-cpp,
-cert-msc51-cpp,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-cplusplus.NewDelete,
-clang-analyzer-cplusplus.NewDeleteLeaks,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-optin.cplusplus.VirtualCall,
-clang-diagnostic-documentation-unknown-command,
-concurrency-mt-unsafe,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-pro-type-member-init,
-cppcoreguidelines-slicing,
-cppcoreguidelines-special-member-functions,
-google-readability-casting,
-google-runtime-references,
-hicpp-multiway-paths-covered,
-hicpp-signed-bitwise,
-misc-macro-parentheses,
-modernize-make-unique,
-modernize-pass-by-value,
-modernize-use-default-member-init,
-performance-no-int-to-ptr,
-performance-unnecessary-value-param,
-readability-const-return-type,
-readability-convert-member-functions-to-static,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-magic-numbers,
-readability-named-parameter,
-readability-suspicious-call-argument,
-COMMENT---disable-aliases---,
-cert-con36-c,
-cert-con54-cpp,
-cert-dcl03-c,
-cert-dcl16-c,
-cert-dcl37-c,
-cert-dcl51-cpp,
-cert-dcl54-cpp,
-cert-dcl59-cpp,
-cert-err09-cpp,
-cert-err61-cpp,
-cert-exp42-c,
-cert-fio38-c,
-cert-flp37-c,
-cert-msc30-c,
-cert-msc32-c,
-cert-oop11-cpp,
-cert-oop54-cpp,
-cert-pos44-c,
-cert-pos47-c,
-cert-sig30-c,
-cert-str34-c,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-c-copy-assignment-signature,
-cppcoreguidelines-explicit-virtual-functions,
-cppcoreguidelines-non-private-member-variables-in-classes,
-google-readability-braces-around-statements,
-google-readability-function-size,
-google-readability-namespace-comments,
-hicpp-avoid-c-arrays,
-hicpp-braces-around-statements,
-hicpp-deprecated-headers,
-hicpp-explicit-conversions,
-hicpp-function-size,
-hicpp-invalid-access-moved,
-hicpp-member-init,
-hicpp-move-const-arg,
-hicpp-named-parameter,
-hicpp-new-delete-operators,
-hicpp-no-array-decay,
-hicpp-no-malloc,
-hicpp-noexcept-move,
-hicpp-special-member-functions,
-hicpp-static-assert,
-hicpp-undelegated-constructor,
-hicpp-uppercase-literal-suffix,
-hicpp-use-auto,
-hicpp-use-emplace,
-hicpp-use-equals-default,
-hicpp-use-equals-delete,
-hicpp-use-noexcept,
-hicpp-use-nullptr,
-hicpp-use-override,
-hicpp-vararg,
-llvm-else-after-return,
-llvm-qualified-auto
WarningsAsErrors: ''
HeaderFilterRegex:
# This is to exclude 'src/third_party'. Needs to be updated, if any new
# directory is added. It's an old outstanding feature request for clang-tidy
# to make this easier...
# It's better to list them, because the sources may be in e.g.
# /home/user/src/widelands/
# TODO(tothxa): figure out which multiline format works...
'src/((ai|base|chat|economy|editor|game_io|graphic|io|logic|map_io|network|notifications|scripting|sound|ui_basic|ui_fsmenu|website|wui)/|[a-z_]+\.h)'
AnalyzeTemporaryDtors: true
FormatStyle: none