-
Notifications
You must be signed in to change notification settings - Fork 20
/
.clang-tidy
167 lines (162 loc) · 5.79 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# Run clang tidy general analysis, excluding variable naming checks.
---
Checks: >
clang-diagnostic-*,
clang-analyzer-*,
boost-use-to-string,
bugprone-*,
cert-dcl58-cpp,
cert-env33-c,
cert-err34-c,
cert-err52-cpp,
cert-err58-cpp,
cert-mem57-cpp,
cert-oop57-cpp,
cert-oop58-cpp,
cppcoreguildelines-*,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-pro-bounds-pointer-arithmatic,
google-*,
-google-runtime-references,
llvm-include-order,
llvm-namespace-comment,
misc-*,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-unused-parameters,
modernize-*,
-modernize-use-trailing-return-type,
performance-*,
readability-*,
-readability-implicit-bool-conversion,
-readability-uppercase-literal-suffix,
hicpp-signed-bitwise
WarningsAsErrors: ''
HeaderFilterRegex: '.*'
AnalyzeTemporaryDtors: false
FormatStyle: none
User: csiro
CheckOptions:
- key: bugprone-argument-comment.StrictMode
value: '1'
- key: bugprone-misplaced-widening-cast.CheckImplicitCasts
value: '1'
- key: performance-move-constructor-init.IncludeStyle
value: 'llvm'
- key: cppcoreguidelines-special-member-functions.AllowSoleDefaultDtor
value: '1'
- key: cppcoreguidelines-special-member-functions.AllowMissingMoveFunctions
value: '1'
- key: google-runtime-int.TypeSuffix
value: '_t'
- key: modernize-use-default-member-init.UseAssignment
value: '1'
# ---------------------------------------------------------------------------
# Classes and structs
# Class names
- key: readability-identifier-naming.ClassCase
value: CamelCase
# Structs
- key: readability-identifier-naming.StructCase
value: CamelCase
# static const class members
- key: readability-identifier-naming.ClassConstantCase
value: CamelCase
- key: readability-identifier-naming.ClassConstantPrefix
value: 'k'
# static class members (non-const)
- key: readability-identifier-naming.ClassMemberCase
value: lower_case
# Class members which are const, but not static - omitted to control by access scope (public, private, etc)
# - key: readability-identifier-naming.ConstantMemberCase
# value: lower_case
# Class member functions - any access modifier (public, private, etc)
- key: readability-identifier-naming.ClassMethodCase
value: camelBack
# Class member variable catchall
- key: readability-identifier-naming.MemberCase
value: lower_case
# Private class member variables
- key: readability-identifier-naming.PrivateMemberCase
value: lower_case
- key: readability-identifier-naming.PrivateMemberSuffix
value: '_'
# Protected member variables
- key: readability-identifier-naming.ProtectedMemberCase
value: lower_case
- key: readability-identifier-naming.ProtectedMemberSuffix
value: '_'
# ---------------------------------------------------------------------------
# Enum declaration name case
- key: readability-identifier-naming.EnumCase
value: CamelCase
# Enum value declarations (the stuff inside the enum)
- key: readability-identifier-naming.EnumConstantCase
value: CamelCase
- key: readability-identifier-naming.EnumConstantPrefix
value: 'k'
# ---------------------------------------------------------------------------
# Templates
- key: readability-identifier-naming.TemplateParameterCase
value: CamelCase
# - key: readability-identifier-naming.TemplateTemplateParameterCase
# value: CamelCase
# - key: readability-identifier-naming.TypeTemplateParameterCase
# value: CamelCase
# - key: readability-identifier-naming.ValueTemplateParameterCase
# value: CamelCase
# ---------------------------------------------------------------------------
# General and global
# constexpr variable assignments
- key: readability-identifier-naming.ConstexprVariableCase
value: CamelCase
- key: readability-identifier-naming.ConstexprVariablePrefix
value: 'k'
# Namespaces
- key: readability-identifier-naming.NamespaceCase
value: lower_case
# General function parameter names
- key: readability-identifier-naming.ParameterCase
value: lower_case
# Union names
- key: readability-identifier-naming.UnionCase
value: CamelCase
# General variable declarations
- key: readability-identifier-naming.VariableCase
value: lower_case
# Typedef names
- key: readability-identifier-naming.TypedefCase
value: CamelCase
# Names for type aliases: using Name = OtherThing;
# Includes aliases declared in classes.
- key: readability-identifier-naming.TypeAliasCase
value: CamelCase
# Free function case
- key: readability-identifier-naming.FunctionCase
value: camelBack
# Global/free constant variable case. Includes anynomous namespaces.
- key: readability-identifier-naming.GlobalConstantCase
value: CamelCase
- key: readability-identifier-naming.GlobalConstantPrefix
value: 'k'
# Variables in the global scope.
- key: readability-identifier-naming.GlobalVariableCase
value: lower_case
- key: readability-identifier-naming.GlobalVariablePrefix
value: 'g_'
# Constants declared within local function scopes. Same as normal variables.
- key: readability-identifier-naming.LocalConstantCase
value: lower_case
- key: readability-identifier-naming.LocalConstantPrefix
value: ''
# Local variable
- key: readability-identifier-naming.LocalVariableCase
value: lower_case
# Magic number ignore list
- key: readability-magic-numbers.IgnoredIntegerValues
value: 0;1;2;3;4;5;6;7;8;9;10;100;1000;16;32;64;128;255;512;1024;2048;4096;8192;16384;32768;32768
- key: readability-magic-numbers.IgnorePowersOf2IntegerValues
value: true
- key: readability-magic-numbers.IgnoredFloatingPointValues
value: 0.25;0.5;0.75;1.0;2.0;3.0;10.0;100.0;1000.0;0.1;0.001;0.0001;;-1.0;-2.0;-3.0;
...