Skip to content

Commit 3d1d8cd

Browse files
committed
added VarTypeHint check to replace EnforceVarTypeHint
1 parent 04ba041 commit 3d1d8cd

File tree

8 files changed

+669
-303
lines changed

8 files changed

+669
-303
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
## dev branch / next version (2.x.x)
44

5+
- **Breaking Change** replaced `EnforceVarTypeHint` with `VarTypeHint` check ([#500](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/500))
56
- Added support for final in `MagicNumber`, fixes [#494](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/494) ([#495](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/495))
67
- Fixed handling `OBJECT_DECL` token in `RightCurly`, fixes [#496](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/496) ([#497](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/497))
78
- Reorganised build files ([#498](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/498))
8-
- Refactored for tokentree API change
9+
- Refactored for tokentree API change ([#500](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/500))
910

1011
## version 2.6.1 (2019-12-17)
1112

resources/checkstyle-excludes-schema.json

Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -18,54 +18,50 @@
1818
},
1919
"UnusedImport": {
2020
"$ref": "#/definitions/ExcludeFilterList",
21-
"propertyOrder": 78
21+
"propertyOrder": 77
2222
},
2323
"Dynamic": {
2424
"$ref": "#/definitions/ExcludeFilterList",
2525
"propertyOrder": 19
2626
},
2727
"Final": {
2828
"$ref": "#/definitions/ExcludeFilterList",
29-
"propertyOrder": 28
29+
"propertyOrder": 27
3030
},
3131
"MultipleStringLiterals": {
3232
"$ref": "#/definitions/ExcludeFilterList",
33-
"propertyOrder": 45
34-
},
35-
"EnforceVarTypeHint": {
36-
"$ref": "#/definitions/ExcludeFilterList",
37-
"propertyOrder": 24
33+
"propertyOrder": 44
3834
},
3935
"NeedBraces": {
4036
"$ref": "#/definitions/ExcludeFilterList",
41-
"propertyOrder": 47
37+
"propertyOrder": 46
4238
},
4339
"SeparatorWhitespace": {
4440
"$ref": "#/definitions/ExcludeFilterList",
45-
"propertyOrder": 64
41+
"propertyOrder": 63
4642
},
4743
"all": {
4844
"$ref": "#/definitions/ExcludeFilterList"
4945
},
5046
"LocalVariableName": {
5147
"$ref": "#/definitions/ExcludeFilterList",
52-
"propertyOrder": 38
48+
"propertyOrder": 37
5349
},
5450
"NestedForDepth": {
5551
"$ref": "#/definitions/ExcludeFilterList",
56-
"propertyOrder": 49
52+
"propertyOrder": 48
5753
},
5854
"Anonymous": {
5955
"$ref": "#/definitions/ExcludeFilterList",
6056
"propertyOrder": 4
6157
},
6258
"MultipleVariableDeclarations": {
6359
"$ref": "#/definitions/ExcludeFilterList",
64-
"propertyOrder": 46
60+
"propertyOrder": 45
6561
},
6662
"NestedTryDepth": {
6763
"$ref": "#/definitions/ExcludeFilterList",
68-
"propertyOrder": 51
64+
"propertyOrder": 50
6965
},
7066
"BlockBreakingConditional": {
7167
"$ref": "#/definitions/ExcludeFilterList",
@@ -81,19 +77,19 @@
8177
},
8278
"ExtendedEmptyLines": {
8379
"$ref": "#/definitions/ExcludeFilterList",
84-
"propertyOrder": 25
80+
"propertyOrder": 24
8581
},
8682
"ReturnCount": {
8783
"$ref": "#/definitions/ExcludeFilterList",
88-
"propertyOrder": 62
84+
"propertyOrder": 61
8985
},
9086
"DefaultComesLast": {
9187
"$ref": "#/definitions/ExcludeFilterList",
9288
"propertyOrder": 17
9389
},
9490
"HexadecimalLiteral": {
9591
"$ref": "#/definitions/ExcludeFilterList",
96-
"propertyOrder": 29
92+
"propertyOrder": 28
9793
},
9894
"WhitespaceAfter": {
9995
"$ref": "#/definitions/ExcludeFilterList",
@@ -109,51 +105,51 @@
109105
},
110106
"Interface": {
111107
"$ref": "#/definitions/ExcludeFilterList",
112-
"propertyOrder": 34
108+
"propertyOrder": 33
113109
},
114110
"WhitespaceAround": {
115111
"$ref": "#/definitions/ExcludeFilterList",
116112
"propertyOrder": 82
117113
},
118114
"NestedIfDepth": {
119115
"$ref": "#/definitions/ExcludeFilterList",
120-
"propertyOrder": 50
116+
"propertyOrder": 49
121117
},
122118
"ParameterName": {
123119
"$ref": "#/definitions/ExcludeFilterList",
124-
"propertyOrder": 55
120+
"propertyOrder": 54
125121
},
126122
"NullableParameter": {
127123
"$ref": "#/definitions/ExcludeFilterList",
128-
"propertyOrder": 52
124+
"propertyOrder": 51
129125
},
130126
"AvoidStarImport": {
131127
"$ref": "#/definitions/ExcludeFilterList",
132128
"propertyOrder": 9
133129
},
134130
"SeparatorWrap": {
135131
"$ref": "#/definitions/ExcludeFilterList",
136-
"propertyOrder": 65
132+
"propertyOrder": 64
137133
},
138134
"AvoidIdentifier": {
139135
"$ref": "#/definitions/ExcludeFilterList",
140136
"propertyOrder": 8
141137
},
142138
"RedundantAllowMeta": {
143139
"$ref": "#/definitions/ExcludeFilterList",
144-
"propertyOrder": 59
140+
"propertyOrder": 58
145141
},
146142
"HiddenField": {
147143
"$ref": "#/definitions/ExcludeFilterList",
148-
"propertyOrder": 30
144+
"propertyOrder": 29
149145
},
150146
"UnnecessaryConstructor": {
151147
"$ref": "#/definitions/ExcludeFilterList",
152-
"propertyOrder": 77
148+
"propertyOrder": 76
153149
},
154150
"SimplifyBooleanExpression": {
155151
"$ref": "#/definitions/ExcludeFilterList",
156-
"propertyOrder": 66
152+
"propertyOrder": 65
157153
},
158154
"path": {
159155
"description": "filters excludes relative to\n\t- RELATIVE_TO_PROJECT = use project root\n\t- RELATIVE_TO_SOURCE = use path(s) specified via \"-s <path>\" command line switches",
@@ -165,39 +161,39 @@
165161
},
166162
"MethodCount": {
167163
"$ref": "#/definitions/ExcludeFilterList",
168-
"propertyOrder": 41
164+
"propertyOrder": 40
169165
},
170166
"UnusedLocalVar": {
171167
"$ref": "#/definitions/ExcludeFilterList",
172-
"propertyOrder": 79
168+
"propertyOrder": 78
173169
},
174170
"TabForAligning": {
175171
"$ref": "#/definitions/ExcludeFilterList",
176-
"propertyOrder": 71
172+
"propertyOrder": 70
177173
},
178174
"MethodName": {
179175
"$ref": "#/definitions/ExcludeFilterList",
180-
"propertyOrder": 43
176+
"propertyOrder": 42
181177
},
182178
"RightCurly": {
183179
"$ref": "#/definitions/ExcludeFilterList",
184-
"propertyOrder": 63
180+
"propertyOrder": 62
185181
},
186182
"AvoidTernaryOperator": {
187183
"$ref": "#/definitions/ExcludeFilterList",
188184
"propertyOrder": 10
189185
},
190186
"ParameterNumber": {
191187
"$ref": "#/definitions/ExcludeFilterList",
192-
"propertyOrder": 56
188+
"propertyOrder": 55
193189
},
194190
"ArrowFunction": {
195191
"$ref": "#/definitions/ExcludeFilterList",
196192
"propertyOrder": 7
197193
},
198194
"MethodLength": {
199195
"$ref": "#/definitions/ExcludeFilterList",
200-
"propertyOrder": 42
196+
"propertyOrder": 41
201197
},
202198
"ConditionalCompilation": {
203199
"$ref": "#/definitions/ExcludeFilterList",
@@ -209,27 +205,27 @@
209205
},
210206
"MemberName": {
211207
"$ref": "#/definitions/ExcludeFilterList",
212-
"propertyOrder": 40
208+
"propertyOrder": 39
213209
},
214210
"ERegLiteral": {
215211
"$ref": "#/definitions/ExcludeFilterList",
216212
"propertyOrder": 20
217213
},
218214
"RedundantModifier": {
219215
"$ref": "#/definitions/ExcludeFilterList",
220-
"propertyOrder": 60
216+
"propertyOrder": 59
221217
},
222218
"Type": {
223219
"$ref": "#/definitions/ExcludeFilterList",
224-
"propertyOrder": 74
220+
"propertyOrder": 73
225221
},
226222
"TypeName": {
227223
"$ref": "#/definitions/ExcludeFilterList",
228-
"propertyOrder": 76
224+
"propertyOrder": 75
229225
},
230226
"Indentation": {
231227
"$ref": "#/definitions/ExcludeFilterList",
232-
"propertyOrder": 31
228+
"propertyOrder": 30
233229
},
234230
"version": {
235231
"maximum": 1,
@@ -238,115 +234,119 @@
238234
},
239235
"Return": {
240236
"$ref": "#/definitions/ExcludeFilterList",
241-
"propertyOrder": 61
237+
"propertyOrder": 60
242238
},
243239
"SimplifyBooleanReturn": {
244240
"$ref": "#/definitions/ExcludeFilterList",
245-
"propertyOrder": 67
241+
"propertyOrder": 66
246242
},
247243
"TODOComment": {
248244
"$ref": "#/definitions/ExcludeFilterList",
249-
"propertyOrder": 70
245+
"propertyOrder": 69
246+
},
247+
"VarTypeHint": {
248+
"$ref": "#/definitions/ExcludeFilterList",
249+
"propertyOrder": 79
250250
},
251251
"NestedControlFlow": {
252252
"$ref": "#/definitions/ExcludeFilterList",
253-
"propertyOrder": 48
253+
"propertyOrder": 47
254254
},
255255
"OperatorWhitespace": {
256256
"$ref": "#/definitions/ExcludeFilterList",
257-
"propertyOrder": 53
257+
"propertyOrder": 52
258258
},
259259
"Spacing": {
260260
"$ref": "#/definitions/ExcludeFilterList",
261-
"propertyOrder": 68
261+
"propertyOrder": 67
262262
},
263263
"IndentationCharacter": {
264264
"$ref": "#/definitions/ExcludeFilterList",
265-
"propertyOrder": 32
265+
"propertyOrder": 31
266266
},
267267
"MagicNumber": {
268268
"$ref": "#/definitions/ExcludeFilterList",
269-
"propertyOrder": 39
269+
"propertyOrder": 38
270270
},
271271
"ArrayLiteral": {
272272
"$ref": "#/definitions/ExcludeFilterList",
273273
"propertyOrder": 6
274274
},
275275
"TrailingWhitespace": {
276276
"$ref": "#/definitions/ExcludeFilterList",
277-
"propertyOrder": 73
277+
"propertyOrder": 72
278278
},
279279
"VariableInitialisation": {
280280
"$ref": "#/definitions/ExcludeFilterList",
281281
"propertyOrder": 80
282282
},
283283
"LineLength": {
284284
"$ref": "#/definitions/ExcludeFilterList",
285-
"propertyOrder": 36
285+
"propertyOrder": 35
286286
},
287287
"ListenerName": {
288288
"$ref": "#/definitions/ExcludeFilterList",
289-
"propertyOrder": 37
289+
"propertyOrder": 36
290290
},
291291
"FileLength": {
292292
"$ref": "#/definitions/ExcludeFilterList",
293-
"propertyOrder": 27
293+
"propertyOrder": 26
294294
},
295295
"CyclomaticComplexity": {
296296
"$ref": "#/definitions/ExcludeFilterList",
297297
"propertyOrder": 16
298298
},
299299
"StringLiteral": {
300300
"$ref": "#/definitions/ExcludeFilterList",
301-
"propertyOrder": 69
301+
"propertyOrder": 68
302302
},
303303
"Trace": {
304304
"$ref": "#/definitions/ExcludeFilterList",
305-
"propertyOrder": 72
305+
"propertyOrder": 71
306306
},
307307
"ArrayAccess": {
308308
"$ref": "#/definitions/ExcludeFilterList",
309309
"propertyOrder": 5
310310
},
311311
"PublicAccessor": {
312312
"$ref": "#/definitions/ExcludeFilterList",
313-
"propertyOrder": 57
313+
"propertyOrder": 56
314314
},
315315
"DocCommentStyle": {
316316
"$ref": "#/definitions/ExcludeFilterList",
317317
"propertyOrder": 18
318318
},
319319
"InnerAssignment": {
320320
"$ref": "#/definitions/ExcludeFilterList",
321-
"propertyOrder": 33
321+
"propertyOrder": 32
322322
},
323323
"RedundantAccessMeta": {
324324
"$ref": "#/definitions/ExcludeFilterList",
325-
"propertyOrder": 58
325+
"propertyOrder": 57
326326
},
327327
"CodeSimilarity": {
328328
"$ref": "#/definitions/ExcludeFilterList",
329329
"propertyOrder": 13
330330
},
331331
"OperatorWrap": {
332332
"$ref": "#/definitions/ExcludeFilterList",
333-
"propertyOrder": 54
333+
"propertyOrder": 53
334334
},
335335
"TypeDocComment": {
336336
"$ref": "#/definitions/ExcludeFilterList",
337-
"propertyOrder": 75
337+
"propertyOrder": 74
338338
},
339339
"LeftCurly": {
340340
"$ref": "#/definitions/ExcludeFilterList",
341-
"propertyOrder": 35
341+
"propertyOrder": 34
342342
},
343343
"ModifierOrder": {
344344
"$ref": "#/definitions/ExcludeFilterList",
345-
"propertyOrder": 44
345+
"propertyOrder": 43
346346
},
347347
"FieldDocComment": {
348348
"$ref": "#/definitions/ExcludeFilterList",
349-
"propertyOrder": 26
349+
"propertyOrder": 25
350350
}
351351
},
352352
"type": "object"

0 commit comments

Comments
 (0)