forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.clang-tidy
118 lines (116 loc) · 3.96 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
# Enable some categories of checks and then disable individual ones.
# The disabled checks that appear as part of the initial alphabetical section
# enabling categories (e.g. cert-err58-cpp) are ones that do not make sense for
# this codebase and we do not intend to fix. The disabled checks appearing
# thereafter in a separate alphabetical list have yet to be triaged. We may
# fix their errors or recategorise them as checks we don't care about.
#
# Comments on the checks we have decided are not worthwhile:
#
# * bugprone-throw-keyword-missing
# This check is too time consuming. Disable it for now to save CI time.
#
# * cert-dcl21-cpp (postfix operator++ and operator-- should return const objects)
# This is an unconventional code style, and conflicts with
# readability-const-return-type.
#
# * cert-env33-c (calls to system, popen)
# Unlikely to catch bugs, and using system is convenient for portability.
#
# * cert-dcl37-c and cert-dcl-51-cpp (reserved identifiers)
# These two checks are aliases for bugprone-reserved-identifier.
# Don't repeatedly run the same check for three times.
#
# * cert-err58-cpp (exceptions from static variable declarations)
# We have lots of memory allocations in static variable declarations, and
# that's fine.
#
# * clang-analyzer-core.{DivideZero,NonNullParamChecker,UndefinedBinaryOperatorResult}
# * clang-analyzer-cplusplus.NewDelete
# They report too many false positives.
#
# * modernize-use-auto
# We prefer an almost-always-avoid-auto style.
#
# * modernize-use-trailing-return-type
# An arbitrary style convention we haven't adopted.
#
# * readability-identifier-naming
# We are not enforcing a standard identifier naming scheme in the code base.
# This check does not bring much value at the moment and consumes a lot of CPU time.
Checks: "\
bugprone-*,\
cata-*,\
cert-*,\
-cert-dcl21-cpp,\
-cert-env33-c,\
-cert-dcl37-c,\
-cert-dcl51-cpp,\
-cert-err58-cpp,\
-clang-analyzer-core.CallAndMessage,\
-clang-analyzer-core.DivideZero,\
-clang-analyzer-core.NonNullParamChecker,\
-clang-analyzer-core.UndefinedBinaryOperatorResult,\
-clang-analyzer-cplusplus.NewDelete,\
clang-diagnostic-*,\
cppcoreguidelines-slicing,\
google-explicit-constructor,\
llvm-namespace-comment,\
misc-*,\
modernize-*,\
-modernize-use-auto,\
-modernize-use-trailing-return-type,\
performance-*,\
readability-*,\
-bugprone-assignment-in-if-condition,\
-bugprone-easily-swappable-parameters,\
-bugprone-empty-catch,\
-bugprone-implicit-widening-of-multiplication-result,\
-bugprone-narrowing-conversions,\
-bugprone-switch-missing-default-case,\
-bugprone-throw-keyword-missing,\
-bugprone-unchecked-optional-access,\
-bugprone-unhandled-exception-at-new,\
-misc-confusable-identifiers,\
-misc-const-correctness,\
-misc-header-include-cycle,\
-misc-include-cleaner,\
-misc-no-recursion,\
-misc-non-private-member-variables-in-classes,\
-misc-use-anonymous-namespace,\
-modernize-concat-nested-namespaces,\
-modernize-macro-to-enum,\
-modernize-pass-by-value,\
-modernize-return-braced-init-list,\
-modernize-use-default-member-init,\
-modernize-use-nodiscard,\
-performance-avoid-endl,\
-performance-noexcept-swap,\
-performance-no-automatic-move,\
-readability-avoid-unconditional-preprocessor-if,\
-readability-container-data-pointer,\
-readability-convert-member-functions-to-static,\
-readability-else-after-return,\
-readability-function-cognitive-complexity,\
-readability-identifier-length,\
-readability-identifier-naming,\
-readability-implicit-bool-conversion,\
-readability-magic-numbers,\
-readability-named-parameter,\
-readability-simplify-boolean-expr,\
-readability-suspicious-call-argument,\
-readability-use-anyofallof,\
"
WarningsAsErrors: '*'
HeaderFilterRegex: '(src|test|tools).*'
FormatStyle: none
CheckOptions:
- key: cata-large-inline-function.MaxStatements
value: 5
- key: cata-text-style.EscapeUnicode
value: 0
- key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField
value: true
- key: readability-uppercase-literal-suffix.NewSuffixes
value: 'L;UL;LL;ULL'
# vim:tw=0