-
Notifications
You must be signed in to change notification settings - Fork 1
/
.clang-tidy
117 lines (112 loc) · 3.6 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
Checks: >
-clang-analyzer-core.NonNullParamChecker,
-clang-analyzer-optin.cplusplus.UninitializedObject,
abseil-duration-*,
abseil-faster-strsplit-delimiter,
abseil-no-namespace,
abseil-redundant-strcat-calls,
abseil-str-cat-append,
abseil-string-find-startswith,
abseil-upgrade-duration-conversions,
bugprone-assert-side-effect,
bugprone-unused-raii,
bugprone-use-after-move,
clang-analyzer-core.DivideZero,
misc-unused-using-decls,
modernize-deprecated-headers,
modernize-loop-convert,
modernize-make-shared,
modernize-make-unique,
modernize-return-braced-init-list,
modernize-use-default-member-init,
modernize-use-equals-default,
modernize-use-nullptr,
modernize-use-override,
modernize-use-using,
performance-faster-string-find,
performance-for-range-copy,
performance-inefficient-algorithm,
performance-inefficient-vector-operation,
performance-noexcept-move-constructor,
performance-move-constructor-init,
performance-type-promotion-in-math-fn,
performance-unnecessary-copy-initialization,
readability-braces-around-statements,
readability-container-size-empty,
readability-identifier-naming,
readability-redundant-control-flow,
readability-redundant-member-init,
readability-redundant-smartptr-get,
readability-redundant-string-cstr
CheckOptions:
- key: cppcoreguidelines-unused-variable.IgnorePattern
value: "^_$"
- key: bugprone-assert-side-effect.AssertMacros
value: 'ASSERT'
- key: bugprone-dangling-handle.HandleClasses
value: 'std::basic_string_view;std::experimental::basic_string_view;absl::string_view'
- key: modernize-use-auto.MinTypeNameLength
value: '10'
- key: readability-identifier-naming.ClassCase
value: 'CamelCase'
- key: readability-identifier-naming.EnumCase
value: 'CamelCase'
- key: readability-identifier-naming.EnumConstantCase
value: 'CamelCase'
# Ignore GoogleTest function macros.
- key: readability-identifier-naming.FunctionIgnoredRegexp
# To have the regex chomped correctly fence all items with `|` (other than first/last)
value: >-
(^AbslHashValue$|
|^called_count$|
|^case_sensitive$|
|^Create$|
|^envoy_resolve_dns$|
|^evconnlistener_free$|
|^event_base_free$|
|^(get|set)EVP_PKEY$|
|^has_value$|
|^Ip6(ntohl|htonl)$|
|^get_$|
|^HeaderHasValue(Ref)?$|
|^HeaderValueOf$|
|^Is(Superset|Subset)OfHeaders$|
|^LLVMFuzzerInitialize$|
|^LLVMFuzzerTestOneInput$|
|^Locality$|
|^MOCK_METHOD$|
|^PrepareCall$|
|^PrintTo$|
|^resolve_dns$|
|^result_type$|
|Returns(Default)?WorkerId$|
|^sched_getaffinity$|
|^shutdownThread_$|
|TEST|
|^use_count$)
- key: readability-identifier-naming.ParameterCase
value: 'lower_case'
- key: readability-identifier-naming.ParameterIgnoredRegexp
value: (^cname_ttl_$)
- key: readability-identifier-naming.PrivateMemberCase
value: 'lower_case'
- key: readability-identifier-naming.PrivateMemberSuffix
value: '_'
- key: readability-identifier-naming.StructCase
value: 'CamelCase'
- key: readability-identifier-naming.TypeAliasCase
value: 'CamelCase'
- key: readability-identifier-naming.TypeAliasIgnoredRegexp
value: '(result_type)'
- key: readability-identifier-naming.UnionCase
value: 'CamelCase'
- key: readability-identifier-naming.FunctionCase
value: 'camelBack'
HeaderFilterRegex: '^./source/.*|^./contrib/.*|^./test/.*|^./envoy/.*'
UseColor: true
WarningsAsErrors: '*'
## The version here is arbitrary since any change to this file will
## trigger a full run of clang-tidy against all files.
## It can be useful as it seems some header changes may not trigger the
## expected rerun.
# v0