Repository navigation
Expand file tree
/
Copy path.clang-tidy
More file actions
93 lines (81 loc) · 3.87 KB
/
Copy path.clang-tidy
File metadata and controls
93 lines (81 loc) · 3.87 KB
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
Checks: [-*,
bugprone-*,
performance-*,
modernize-*,
readability-isolate-declaration,
readability-container-contains,
readability-container-size-empty,
readability-const-return-type,
# Enable a very limited number of the cppcoreguidelines checkers.
# See the notes for some of the rest of them below.
cppcoreguidelines-macro-usage,
cppcoreguidelines-misleading-capture-default-by-value,
cppcoreguidelines-virtual-class-destructor,
cppcoreguidelines-pro-type-cstyle-cast,
# Skipping these temporarily because they are very noisy
-bugprone-forward-declaration-namespace,
-bugprone-narrowing-conversions,
-bugprone-signed-bitwise,
-bugprone-unchecked-optional-access,
-bugprone-unchecked-string-to-number-conversion,
-modernize-use-integer-sign-comparison,
# The following cause either lots of pointless or advisory warnings
-bugprone-easily-swappable-parameters,
-bugprone-nondeterministic-pointer-iteration-order,
# bifcl generates a lot of code with double underscores in their name.
# ZAM uses a few identifiers that start with underscores or have
# double-underscores in the name.
-bugprone-reserved-identifier,
# binpac generates switch statements without default cases if case
# blocks in the pac files don't have default statements. This one
# generates a lot of warnings.
-bugprone-switch-missing-default-case,
# These report warnings that are rather difficult to fix or are things
# we simply don't want to fix.
-bugprone-assignment-in-selection-statement,
-bugprone-pointer-arithmetic-on-polymorphic-object,
-bugprone-exception-escape,
-bugprone-command-processor,
-bugprone-throwing-static-initialization,
-modernize-avoid-c-arrays,
-modernize-concat-nested-namespaces,
-modernize-raw-string-literal,
-modernize-use-auto,
-modernize-use-nodiscard,
-modernize-use-std-bit,
-modernize-use-trailing-return-type,
-modernize-use-designated-initializers,
-modernize-use-string-view,
# I'd like to enable this at some point, but it's going to warn on all
# of our fmt() and Reporter methods.
-modernize-avoid-variadic-functions,
# There are a lot of unhandled exceptions across the code base because
# one of the reporter handlers throws an exception. Reporter already
# reported the error, so the exception is just to exit the processing.
# We don't need to do anything more with those exceptions.
-bugprone-empty-catch,
# This one returns a bunch of findings in DFA and the sqlite library.
# We're unlikely to fix either of them.
-performance-no-int-to-ptr,
# These cppcoreguidelines checkers are things we should investigate
# and possibly fix, but there are so many findings that we're holding
# off doing it for now.
#cppcoreguidelines-init-variables,
#cppcoreguidelines-prefer-member-initializer,
#cppcoreguidelines-pro-type-member-init,
#cppcoreguidelines-pro-type-static-cast-downcast,
#cppcoreguidelines-special-member-functions,
# These are features in newer version of C++ that we don't have
# access to yet.
-modernize-use-std-format,
-modernize-use-std-print,
]
HeaderFilterRegex: '.h'
ExcludeHeaderFilterRegex: '.*(auxil|3rdparty|build/libkqueue-build)/.*'
SystemHeaders: false
CheckOptions:
- key: modernize-use-default-member-init.UseAssignment
value: 'true'
- key: performance-unnecessary-value-param.AllowedTypes
value: zeek::.*Ptr;zeek::plugin::HookArgument
WarningsAsErrors: '*'