-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.clang-tidy
45 lines (44 loc) · 2.33 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
---
WarningsAsErrors: "*"
Checks: >
-*,
abseil-*,
bugprone-*,
google-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
performance-*,
readability-magic-numbers,
# clang-analyzer-cplusplus.NewDeleteLeaks TODO(#632) readd
-modernize-use-trailing-return-type,
-misc-non-private-member-variables-in-classes,
-misc-include-cleaner,
-google-readability-avoid-underscore-in-googletest-name,
-abseil-string-find-str-contains,
-bugprone-easily-swappable-parameters,
-bugprone-unchecked-optional-access,
-bugprone-unused-return-value,
-readability-magic-numbers
# TODO(someone): clean up misc-non-private-member-variables-in-classes and add option back in
# Not using google-readability-avoid-underscore-in-googletest-name because it also fails for test_name
# Not using abseil-string-find-str-contains because we don't want to include more libraries
# Not using bugprone-unused-return-value because we get spurious positives for overridden 'T& operator=(T&)'
CheckOptions:
- { key: readability-identifier-naming.NamespaceCase, value: lower_case }
- { key: readability-identifier-naming.ClassCase, value: CamelCase }
- { key: readability-identifier-naming.StructCase, value: CamelCase }
- { key: readability-identifier-naming.TemplateParameterCase, value: CamelCase }
- { key: readability-identifier-naming.FunctionCase, value: camelBack }
- { key: readability-identifier-naming.VariableCase, value: lower_case }
- { key: readability-identifier-naming.ClassMemberCase, value: lower_case }
- { key: readability-identifier-naming.EnumConstantCase, value: UPPER_CASE }
- { key: readability-identifier-naming.GlobalConstantCase, value: UPPER_CASE }
- { key: readability-identifier-naming.ConstexprVariableCase, value: UPPER_CASE }
- { key: readability-identifier-naming.TypeTemplateParameterIgnoredRegexp, value: expr-type }
- { key: readability-implicit-bool-conversion.AllowIntegerConditions, value: 1 }
- { key: readability-implicit-bool-conversion.AllowPointerConditions, value: 1 }
- { key: bugprone-easily-swappable-parameters.MinimumLength, value: 2 }
# readability-identifier-naming.TypeTemplateParameterIgnoredRegexp is workaround for error of clang-tidy with ubuntu (https://github.com/llvm/llvm-project/issues/46097)