forked from hyrise/hyrise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.clang-tidy
141 lines (106 loc) · 7.69 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
Checks: '*,-*-default-arguments*,-*braces-around-statements,-google-build-using-namespace,-clang-analyzer-security.insecureAPI.rand,-readability-implicit-bool-conversion,-cppcoreguidelines-pro-type-reinterpret-cast,-readability-misleading-indentation,-modernize-pass-by-value,-cppcoreguidelines-pro-bounds-constant-array-index,-cppcoreguidelines-pro-type-static-cast-downcast,-misc-unused-parameters,-cppcoreguidelines-pro-bounds-array-to-pointer-decay,-hicpp-no-array-decay,-readability-named-parameter,-cert-dcl58-cpp,-clang-analyzer-optin.cplusplus.VirtualCall,-modernize-avoid-bind,-hicpp-no-assembler,-cppcoreguidelines-pro-type-vararg,-hicpp-vararg,-cert-env33-c,-misc-macro-parentheses,-readability-else-after-return,-fuchsia-overloaded-operator,-cppcoreguidelines-pro-bounds-pointer-arithmetic,-google-runtime-references,-cert-err58-cpp,-llvm-include-order,-clang-analyzer-cplusplus.NewDelete*,-cert-msc32-c,-cert-msc51-cpp,-fuchsia-statically-constructed-objects,-bugprone-exception-escape,-*-uppercase-literal-suffix,-cert-dcl16-c,-*-magic-numbers,-*-non-private-member-variables-in-classes,-modernize-use-trailing-return-type,-clang-diagnostic-unknown-warning-option'
WarningsAsErrors: '*'
# Explanation of disabled checks:
# *-default-arguments* We do use default arguments (and like them)
# *braces-around-statements We do allow then blocks without braces if they are in the same line
# google-build-using-namespace While we discourage its use, in some cases, using namespace makes sense
# clang-analyzer-security.insecureAPI.rand We don't care about cryptographically unsafe rand() calls
# readability-implicit-bool-conversion Doesn't like if(map.count(foo))
# cppcoreguidelines-pro-type-reinterpret-cast We use reinterpret_cast
# readability-misleading-indentation Doesn't like if constexpr
# modernize-pass-by-value We don't trust people to properly use std::move
# cppcoreguidelines-pro-bounds-constant-array-index Weird stuff. "do not use array subscript when the index is not an integer constant expression"?!
# cppcoreguidelines-pro-type-static-cast-downcast We do allow static downcasts for performance reasons
# misc-unused-parameters We don't care about unused parameters
# cppcoreguidelines-pro-bounds-array-to-pointer-decay Weird stuff - it doesn't like `description_mode == DescriptionMode::MultiLine`
# hicpp-no-array-decay (same)
# readability-named-parameter Unused parameters don't need names
# cert-dcl58-cpp Adding a hash function to std is perfectly legal: https://en.cppreference.com/w/cpp/language/extending_std
# clang-analyzer-optin.cplusplus.VirtualCall false positive in boost::lexical_cast
# modernize-avoid-bind meh, bind isn't thaaaat bad
# hicpp-no-assembler Sometimes we need assembler...
# cppcoreguidelines-pro-type-vararg We use old C functions for ncurses
# hicpp-vararg (same)
# cert-env33-c Yes, we do call system()
# misc-macro-parentheses Causes weird problems with BOOST_PP_TUPLE_ELEM
# readability-else-after-return "do not use 'else' after 'return'" - no idea who originally came up with that...
# fuchsia-overloaded-operator We are not supposed to overload operator()?!
# cppcoreguidelines-pro-bounds-pointer-arithmetic Doesn't like DebugAssert
# google-runtime-references Doesn't like mutable references
# cert-err58-cpp We reeeeeally don't care about uncaught exceptions
# llvm-include-order Handled by cpplint.py which is way faster
# clang-analyzer-cplusplus.NewDelete* False positives with shared_ptr::operator=
# cert-msc32-c, -cert-msc51-cpp Ok, so our generated tables are not cryptographically safe
# fuchsia-statically-constructed-objects We have too many static objects
# bugprone-exception-escape We throw exceptions in many places (even destructors) and are completely fine with std::terminate
# *-uppercase-literal-suffix Don't really care if it's 1.0f or 1.0F
# cert-dcl16-c (same)
# *-magic-numbers Too many false positives
# *-non-private-member-variables-in-classes We like making things public
# modernize-use-trailing-return-type https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-trailing-return-type.html - no that is way too weird
# clang-diagnostic-unknown-warning-option Don't complain about gcc warning options
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariableCase
value: UPPER_CASE
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: lower_case
- key: readability-identifier-naming.GlobalFunctionCase
value: lower_case
- key: readability-identifier-naming.InlineNamespaceCase
value: lower_case
- key: readability-identifier-naming.LocalConstantCase
value: lower_case
- key: readability-identifier-naming.LocalVariableCase
value: lower_case
- key: readability-identifier-naming.MemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberPrefix
value: '_'
- key: readability-identifier-naming.ProtectedMemberPrefix
value: '_'
- key: readability-identifier-naming.PublicMemberCase
value: lower_case
- key: readability-identifier-naming.MethodCase
value: lower_case
- key: readability-identifier-naming.PrivateMethodPrefix
value: '_'
- key: readability-identifier-naming.ProtectedMethodPrefix
value: '_'
- key: readability-identifier-naming.NamespaceCase
value: lower_case
- key: readability-identifier-naming.ParameterCase
value: lower_case
- key: readability-identifier-naming.ConstantParameterCase
value: lower_case
- key: readability-identifier-naming.ParameterPackCase
value: lower_case
- key: readability-identifier-naming.StaticConstantCase
value: lower_case
- key: readability-identifier-naming.StaticVariableCase
value: lower_case
- key: readability-identifier-naming.StructCase
value: CamelCase
- key: readability-identifier-naming.TemplateParameterCase
value: UPPER_CASE
- key: readability-identifier-naming.TemplateTemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.TemplateUsingCase
value: lower_case
- key: readability-identifier-naming.TypeTemplateParameterCase
value: CamelCase
- key: readability-identifier-naming.TypedefCase
value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.UsingCase
value: lower_case
- key: readability-identifier-naming.ValueTemplateParameterCase
value: lower_case
- key: readability-identifier-naming.VariableCase
value: lower_case