-
Notifications
You must be signed in to change notification settings - Fork 587
Expand file tree
/
Copy path.clang-tidy
More file actions
89 lines (86 loc) · 3.12 KB
/
.clang-tidy
File metadata and controls
89 lines (86 loc) · 3.12 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
---
# TODO: We currently only enable select clang-tidy checks. While many checks provide little value or
# produce false positives, try to incrementally enable most of them.
# TODO: these checks are in progress of cleaning up
# Note: cppcoreguidelines-noexcept-destructor is designed to detect destructors that are missing
# noexcept. We always use noexcept(false) as per KJ-style, but this check works for our purposes
# too.
Checks: >
bugprone-argument-comment,
bugprone-capturing-this-in-member-variable,
bugprone-dynamic-static-initializers,
bugprone-forward-declaration-namespace,
bugprone-invalid-enum-default-initialization,
bugprone-move-forwarding-reference,
bugprone-return-const-ref-from-parameter,
bugprone-suspicious-*,
-bugprone-suspicious-semicolon,
bugprone-undefined-memory-manipulation,
bugprone-unhandled-self-assignment,
bugprone-unused-raii,
bugprone-use-after-move,
cppcoreguidelines-c-copy-assignment-signature,
cppcoreguidelines-misleading-capture-default-by-value,
cppcoreguidelines-noexcept-destructor,
cppcoreguidelines-prefer-member-initializer,
google-readability-casting,
misc-confusable-identifiers,
misc-header-include-cycle,
misc-redundant-expression,
misc-throw-by-value-catch-by-reference,
misc-unused-alias-decls,
misc-unused-using-decls,
modernize-loop-convert,
modernize-macro-to-enum,
modernize-redundant-void-arg,
modernize-type-traits,
modernize-unary-static-assert,
modernize-use-bool-literals,
modernize-use-constraints,
modernize-use-emplace,
modernize-use-equals-delete,
modernize-use-nullptr,
modernize-use-string-view,
modernize-use-transparent-functors,
modernize-use-using,
performance-*,
-performance-enum-size,
-performance-no-int-to-ptr,
-performance-noexcept-move-constructor,
-performance-noexcept-swap,
-performance-unnecessary-value-param,
readability-avoid-const-params-in-decls,
readability-container-contains,
readability-container-size-empty,
readability-delete-null-pointer,
readability-duplicate-include,
readability-enum-initial-value,
readability-redundant-*,
-readability-redundant-inline-specifier,
-readability-redundant-parentheses,
-readability-redundant-smartptr-get,
readability-reference-to-constructed-temporary,
readability-static-accessed-through-instance,
readability-use-concise-preprocessor-directives
# TODO: Fix and enable
# bugprone-derived-method-shadowing-base-method
# bugprone-parent-virtual-call
# cppcoreguidelines-interfaces-global-init
# cppcoreguidelines-missing-std-forward
# cppcoreguidelines-pro-type-member-init
# modernize-use-equals-default
# modernize-use-override
# modernize-use-ranges
# readability-avoid-return-with-void-value
# modernize-avoid-variadic-functions
# readability-convert-member-functions-to-static
# readability-redundant-smartptr-get
# readability-use-anyofallof
WarningsAsErrors: '*'
HeaderFilterRegex: '.*src/workerd/.*'
CheckOptions:
# JSG has very entrenched include cycles
- key: misc-header-include-cycle.IgnoredFilesList
value: "jsg/jsg.h|jsg/dom-exception.h"
- key: cppcoreguidelines-missing-std-forward.ForwardFunction
value: "kj::fwd"