forked from sorbet/sorbet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
77 lines (76 loc) · 2.71 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
# -*- mode: yaml -*-
# NOTE(nelhage): See https://reviews.llvm.org/D30567 for some context
# on why this list is formatted so oddly. This seems to be the best
# way to format the check list in a readable way.
#
# Despite the conclusion of that issue, clang's yaml parser doesn't
# support flow literals with `>`, so we fall back on the first
# mentioned solution.
Checks: '
,-*,
,misc-move-const-arg,
,modernize-deprecated-headers,
,modernize-loop-convert,
,modernize-use-nullptr,
,readability-braces-around-statements,
,readability-container-size-empty,
,readability-implicit-bool-cast,
,bugprone-assert-side-effect,
,bugprone-dangling-handle,
,bugprone-forward-declaration-namespace,
,bugprone-inaccurate-erase,
,bugprone-move-forwarding-reference,
,bugprone-string-constructor,
,bugprone-suspicious-memset-usage,
,bugprone-use-after-move,
,bugprone-virtual-near-miss,
,modernize-use-auto,
,modernize-avoid-bind,
,modernize-make-shared,
,modernize-make-unique,
,modernize-pass-by-value,
,modernize-raw-string-literal,
,modernize-redundant-void-arg,
,modernize-replace-auto-ptr,
,modernize-replace-random-shuffle,
,modernize-shrink-to-fit,
,modernize-unary-static-assert,
,modernize-use-bool-literals,
,modernize-use-default-member-init,
,modernize-use-emplace,
,modernize-use-equals-default,
,modernize-use-equals-delete,
,modernize-use-nullptr,
,modernize-use-override,
,modernize-use-transparent-functors,
,modernize-use-using,
,readability-avoid-const-params-in-decls,
,readability-delete-null-pointer,
,readability-deleted-default,
,readability-function-size,
,readability-identifier-naming,
,readability-inconsistent-declaration-parameter-name,
,readability-misleading-indentation,
,readability-misplaced-array-index,
,readability-named-parameter,
,readability-non-const-parameter,
,readability-redundant-control-flow,
,readability-redundant-declaration,
,readability-redundant-function-ptr-dereference,
,readability-redundant-member-init,
,readability-redundant-string-cstr,
,readability-redundant-string-init,
,readability-static-accessed-through-instance,
,readability-static-definition-in-anonymous-namespace,
,readability-uniqueptr-delete-release,
'
# not enabling google-readability-redundant-smartptr-get because it also changes it in conditions `foo.get() == nullptr` vs `foo == nullptr`
# not enabling readability-else-after-return because it is iterative and it break } else if (..) { into 2 lines.
WarningsAsErrors: '*'
AnalyzeTemporaryDtors: false
FormatStyle: file
CheckOptions:
- key: 'bugprone-assert-side-effect.AssertMacros'
value: 'ENFORCE'
- key: 'bugprone-dangling-handle.HandleClasses'
value: 'absl::string_view'