-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathcppnamelint.toml
More file actions
241 lines (209 loc) · 7.63 KB
/
cppnamelint.toml
File metadata and controls
241 lines (209 loc) · 7.63 KB
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
[General.Options]
Version = 0.3
FileExtNameList = ["*.c","*.h","*.cpp"]
CheckFileName = false
CheckVariableName = true
CheckFunctionName = true
CheckEnum = true
CheckStruct = true
CheckClass = true
CheckParameter = true # TODO
AllowedWriteJsonResult = false
AllowedArrayAffected = false
# [Deprecated]
# Allow underscope character in naming.
# 1. Instead with Camels.Options.AllowedOneUnderscope.
# 2. Instead with Hungarian.Options.AllowedOneUnderscope.
AllowedUnderscopeChar = false # Default: false
# Check results can be printed to screen. You can disable it use JSON output
# instead.
AllowedPrintResult = true # Default: true
# Missed header will cause Decl may be treated as wrong.
# Ways to avoid it:
# 1. Indicate header directory via `-include` option.
# 2. Set this option to `false`.
BypassInvalidDecl = false # Default: false
[General.Rules]
FileName = 0 # 0: Default (UpperCamel)
# 1: UpperCamel
# 3: lower_snake
FunctionName = 0 # 0: Default (UpperCamel)
# 1: UpperCamel
# 2: lowerCamel
# 3: lower_snake
VariableName = 4 # 0: Default (Hungarian)
# 1: UpperCamel
# 2: lowerCamel
# 3: lower_snake
# 4: Hungarian
ClassName = 0 # 0: Default (UpperCamel)
# 1: UpperCamel
# 2: lowerCamel
# 3: lower_snake
# 5: UPPER_SNAKE
EnumTagName = 0 # 0: Default (UpperCamel)
# 1: UpperCamel
# 2: lowerCamel
# 3: lower_snake
# 5: UPPER_SNAKE
EnumValueName = 0 # 0: Default (UpperCamel)
# 1: UpperCamel
# 2: lowerCamel
# 3: lower_snake
# 4: Hungarian
# 5: UPPER_SNAKE
StructTagName = 0 # 0: Default (UpperCamel)
# 1: UpperCamel
# 2: lowerCamel
# 3: lower_snake
# 5: UPPER_SNAKE
StructValueName = 0 # 0: Default (UpperCamel)
# 1: UpperCamel
# 2: lowerCamel
# 3: lower_snake
# 4: Hungarian
# 5: UPPER_SNAKE
[General.IgnoredList]
FunctionPrefix = [ "_",
"__",
"~"]
VariablePrefix = [ "m_" ]
EnumTagPrefix = [ "_", "e" ]
StructTagPrefix = [ "_", "s" ]
FunctionName = ["main", # Entry for loader of executable binary file.
"newASTConsumer", #
"TEST" # Function of Google Test
]
[Camels.Options]
# Allow underscope character in naming.
AllowUnderscope = 0 # 0 = DoNotAllow (Default)
# 1 = AllowedOneUnderscope,
# 2 = AllowedSingleUnderscope
[Hungarian.Options]
PreferUpperCamelIfMissed = true
# [TODO]
# Allow underscope character in naming.
AllowUnderscope = 0 # 0 = DoNotAllow (Default)
# 1 = AllowedOneUnderscope,
# 2 = AllowedSingleUnderscope
[Hungarian.NullStringList]
"char*" = "sz"
"wchar_t*" = "wsz"
"char**" = "psz"
"wchar_t**" = "pwsz"
"char[]" = "sz"
"wchar_t[]" = "wsz"
[Hungarian.WordList]
# C Primitive Type
"void" = ""
"size_t" = "n"
"int8_t" = "i8"
"int16_t" = "i16"
"int32_t" = "i32"
"int64_t" = "i64"
"uint8_t" = "u8"
"uint16_t" = "u16"
"uint32_t" = "u32"
"uint64_t" = "u64"
"char" = "c"
"_Bool" = "b"
"bool" = "b"
"int" = "i"
"wchar_t" = "wc"
"signed char" = "sc"
"unsigned char" = "uc"
"short" = "s"
"short int" = "si"
"signed short" = "ss"
"signed short int" = "ssi"
"unsigned short" = "us"
"unsigned short int" = "usi"
"signed" = "s"
"signed int" = "si"
"unsigned" = "u"
"unsigned int" = "ui"
"long" = "l"
"long int" = "li"
"signed long" = "sl"
"signed long int" = "sli"
"unsigned long" = "ul"
"unsigned long int" = "uli"
"long long" = "ll"
"long long int" = "lli"
"signed long long" = "sll"
"signed long long int" = "slli"
"unsigned long long" = "ull"
"unsigned long long int" = "ulli"
"float" = "f"
"double" = "d"
"long double" = "ld"
# Windows Type - Variable
"ULONG" = "ul"
"UINT" = "ui"
"DWORD" = "dw"
"DWORD64" = "dw64"
"WORD" = "w"
"CHAR" = "c"
"BYTE" = "by"
"BOOL" = "b"
"BOOLEAN" = "b"
"LONGLONG" = "ll"
"UCHAR" = "uc"
# Windows Type - Handle
HANDLE = "h"
HACCEL = "h"
HBITMAP = "h"
HBRUSH = "h"
HCOLORSPACE = "h"
HCONV = "h"
HCONVLIST = "h"
HCURSOR = "h"
HDC = "h"
HDDEDATA = "h"
HDESK = "h"
HDROP = "h"
HDWP = "h"
HENHMETAFILE = "h"
HFILE = "h"
HFONT = "h"
HGDIOBJ = "h"
HGLOBAL = "h"
HHOOK = "h"
HICON = "h"
HINSTANCE = "h"
HKEY = "h"
HLOCAL = "h"
HMENU = "h"
HMETAFILE = "h"
HMODULE = "h"
HMONITOR = "h"
HPALETTE = "h"
HPEN = "h"
HRGN = "h"
HRSRC = "h"
HSZ = "h"
HWINSTA = "h"
HWND = "h"
LPHANDLE = "h"
PHANDLE = "h"
SC_HANDLE = "h"
SERVICE_STATUS_HANDLE = "h"
# Windows Type - Parameter
WPARAM = "w"
LPARAM = "l"
# Redefined pointer types
# PINT8 = "i8" # PINT8 pi8Value = NULL;
# PINT16 = "i16" # PINT16 pi16Value = NULL;
# PINT32 = "i32" # PINT32 pi32Value = NULL;
# PINT64 = "i64" # PINT64 pi64Value = NULL;
# PUINT8 = "u8" # PINT8 pu8Value = NULL;
# PUINT16 = "u16" # PINT16 pu16Value = NULL;
# PUINT32 = "u32" # PINT32 pu32Value = NULL;
# PUINT64 = "u64" # PINT64 pu64Value = NULL;
[Debug.Log]
ContentStartsPosition = 55
Main = true
DumpDecl = true
AstVisitor = true
Detection = true
Config = true