-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.clang-tidy
74 lines (69 loc) · 3.22 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
---
HeaderFilterRegex: ^(include|src|tests|benches)
Checks: -*,boost-*,bugprone-*,-bugprone-narrowing-conversions,-bugprone-easily-swappable-parameters,clang-analyzer-*,-clang-analyzer-cplusplus.NewDeleteLeaks,concurrency-*,cppcoreguidelines-*,misc-*,modernize-*,-modernize-pass-by-value,-modernize-use-trailing-return-type,-modernize-use-nodiscard,performance-*,portability-*,readability-*,-readability-make-member-function-const,-readability-redundant-access-specifiers,-readability-convert-member-functions-to-static,-readability-magic-numbers,-readability-named-parameter,-readability-identifier-length,-misc-const-correctness
WarningsAsErrors: '*'
InheritParentConfig: false
CheckOptions:
- key: readability-identifier-naming.AbstractClassCase
value: CamelCase
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.MethodCase
value: lower_case
- key: readability-identifier-naming.PrivateMethodSuffix
value: _
- key: readability-identifier-naming.MacroDefinitionCase
value: UPPER_CASE
- key: readability-identifier-naming.LocalVariableCase
value: lower_case
- key: readability-identifier-naming.StaticVariableCase
value: UPPER_CASE
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: k
- key: readability-function-cognitive-complexity.IgnoreMacros
value: true
- key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
value: true
#### Disabled checks and why: #####
#
# -readability-convert-member-functions-to-static
# This check started going off in the upgrade from clang-tidy-8 to clang-tidy-12. It is not always correct because
# we hide the reference implementation in another repository.
# -readability-redundant-access-specifiers
# make code cleaner
# -readability-magic-numbers
# duplicated with cppcoreguidelines-avoid-magic-numbers
# -clang-analyzer-security.insecureAPI.rand, -clang-analyzer-security.insecureAPI.rand, -bugprone-unhandled-self-assignment,
# -bugprone-narrowing-conversions
# Dup with cppcoreguidelines-narrowing-conversions
# -bugprone-easily-swappable-parameters
# Too many false positives
# -modernize-use-nodiscard,
# New C++17 feature, slightly polarizing. Would clutter codebase.
# -modernize-use-trailing-return-type
# -modernize-pass-by-value
# Useless
# -readability-magic-numbers
# Let's not deal with people doing ridiculous things to hack around this. If it bites them, it bites them.
# -readability-named-parameter
# Unused parameter is unnamed
# -readability-identifier-length
# Too verbose
# -clang-diagnostic-implicit-int-float-conversion, -readability-make-member-function-const,
#
# -clang-analyzer-cplusplus.NewDeleteLeaks
# Too many false-positives
# -misc-const-correctness
# Too slow