npm-groovy-lint 9.5.0 → 10.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +40 -2
  2. package/README.md +29 -3
  3. package/lib/.groovylintrc-all.json +0 -1
  4. package/lib/.groovylintrc-format.json +2 -0
  5. package/lib/codenarc-caller.js +7 -3
  6. package/lib/codenarc-factory.js +103 -16
  7. package/lib/example/RuleSet-All.groovy +413 -417
  8. package/lib/example/SampleFileSmall.groovy +3 -3
  9. package/lib/example/SampleFileSmallFixed.txt +4 -4
  10. package/lib/example/SampleFileSmallFormatted.txt +4 -4
  11. package/lib/groovy-lint-rules.js +2 -0
  12. package/lib/groovy-lint.js +3 -1
  13. package/lib/index.js +5 -1
  14. package/lib/java/CodeNarc-3.1.0.jar +0 -0
  15. package/lib/java/CodeNarcServer.jar +0 -0
  16. package/lib/java/GMetrics-2.1.0.jar +0 -0
  17. package/lib/java/{log4j-api-2.17.1.jar → log4j-api-2.18.0.jar} +0 -0
  18. package/lib/java/{log4j-core-2.17.1.jar → log4j-core-2.18.0.jar} +0 -0
  19. package/lib/java/{log4j-slf4j-impl-2.17.1.jar → log4j-slf4j-impl-2.18.0.jar} +0 -0
  20. package/lib/options.js +28 -14
  21. package/lib/output.js +1 -3
  22. package/lib/rules/DuplicateNumberLiteral.js +21 -0
  23. package/lib/rules/DuplicateStringLiteral.js +21 -0
  24. package/lib/rules/MethodParameterTypeRequired.js +21 -0
  25. package/lib/rules/MisorderedStaticImports.js +2 -2
  26. package/lib/rules/NoDef.js +14 -0
  27. package/lib/rules/SimpleDateFormatMissingLocale.js +14 -0
  28. package/lib/rules/SpaceAfterMethodCallName.js +30 -0
  29. package/lib/rules/SpaceInsideParentheses.js +73 -0
  30. package/lib/rules/UnnecessaryPublicModifier.js +13 -0
  31. package/lib/rules/VariableTypeRequired.js +36 -0
  32. package/lib/utils.js +2 -2
  33. package/package.json +5 -8
  34. package/lib/java/CodeNarc-2.2.0.jar +0 -0
  35. package/lib/java/gmetrics-1.1.jar +0 -0
@@ -1,7 +1,6 @@
1
1
  /* groovylint-disable CompileStatic */
2
2
  // More info there : http://codenarc.github.io/CodeNarc/codenarc-creating-ruleset.html
3
3
  ruleset {
4
-
5
4
  description '''
6
5
  A Sample Groovy RuleSet containing all CodeNarc Rules, grouped by category.
7
6
  You can use this as a template for your own custom RuleSet.
@@ -9,444 +8,441 @@ ruleset {
9
8
  '''
10
9
 
11
10
  // rulesets/basic.xml
12
- AssertWithinFinallyBlock
13
- AssignmentInConditional
14
- BigDecimalInstantiation
15
- BitwiseOperatorInConditional
16
- BooleanGetBoolean
17
- BrokenNullCheck
18
- BrokenOddnessCheck
19
- ClassForName
20
- ComparisonOfTwoConstants
21
- ComparisonWithSelf
22
- ConstantAssertExpression
23
- ConstantIfExpression
24
- ConstantTernaryExpression
25
- DeadCode
26
- DoubleNegative
27
- DuplicateCaseStatement
28
- DuplicateMapKey
29
- DuplicateSetValue
30
- EmptyCatchBlock
31
- EmptyClass
32
- EmptyElseBlock
33
- EmptyFinallyBlock
34
- EmptyForStatement
35
- EmptyIfStatement
36
- EmptyInstanceInitializer
37
- EmptyMethod
38
- EmptyStaticInitializer
39
- EmptySwitchStatement
40
- EmptySynchronizedStatement
41
- EmptyTryBlock
42
- EmptyWhileStatement
43
- EqualsAndHashCode
44
- EqualsOverloaded
45
- ExplicitGarbageCollection
46
- ForLoopShouldBeWhileLoop
47
- HardCodedWindowsFileSeparator
48
- HardCodedWindowsRootDirectory
49
- IntegerGetInteger
50
- MultipleUnaryOperators
51
- ParameterAssignmentInFilterClosure
52
- RandomDoubleCoercedToZero
53
- RemoveAllOnSelf
54
- ReturnFromFinallyBlock
55
- ThrowExceptionFromFinallyBlock
56
-
11
+ AssertWithinFinallyBlock
12
+ AssignmentInConditional
13
+ BigDecimalInstantiation
14
+ BitwiseOperatorInConditional
15
+ BooleanGetBoolean
16
+ BrokenNullCheck
17
+ BrokenOddnessCheck
18
+ ClassForName
19
+ ComparisonOfTwoConstants
20
+ ComparisonWithSelf
21
+ ConstantAssertExpression
22
+ ConstantIfExpression
23
+ ConstantTernaryExpression
24
+ DeadCode
25
+ DoubleNegative
26
+ DuplicateCaseStatement
27
+ DuplicateMapKey
28
+ DuplicateSetValue
29
+ EmptyCatchBlock
30
+ EmptyClass
31
+ EmptyElseBlock
32
+ EmptyFinallyBlock
33
+ EmptyForStatement
34
+ EmptyIfStatement
35
+ EmptyInstanceInitializer
36
+ EmptyMethod
37
+ EmptyStaticInitializer
38
+ EmptySwitchStatement
39
+ EmptySynchronizedStatement
40
+ EmptyTryBlock
41
+ EmptyWhileStatement
42
+ EqualsAndHashCode
43
+ EqualsOverloaded
44
+ ExplicitGarbageCollection
45
+ ForLoopShouldBeWhileLoop
46
+ HardCodedWindowsFileSeparator
47
+ HardCodedWindowsRootDirectory
48
+ IntegerGetInteger
49
+ MultipleUnaryOperators
50
+ ParameterAssignmentInFilterClosure
51
+ RandomDoubleCoercedToZero
52
+ RemoveAllOnSelf
53
+ ReturnFromFinallyBlock
54
+ ThrowExceptionFromFinallyBlock
55
+
57
56
  // rulesets/braces.xml
58
- ElseBlockBraces
59
- ForStatementBraces
60
- IfStatementBraces
61
- WhileStatementBraces
62
-
57
+ ElseBlockBraces
58
+ ForStatementBraces
59
+ IfStatementBraces
60
+ WhileStatementBraces
61
+
63
62
  // rulesets/comments.xml
64
- ClassJavadoc
65
- JavadocConsecutiveEmptyLines
66
- JavadocEmptyAuthorTag
67
- JavadocEmptyExceptionTag
68
- JavadocEmptyFirstLine
69
- JavadocEmptyLastLine
70
- JavadocEmptyParamTag
71
- JavadocEmptyReturnTag
72
- JavadocEmptySeeTag
73
- JavadocEmptySinceTag
74
- JavadocEmptyThrowsTag
75
- JavadocEmptyVersionTag
76
- JavadocMissingExceptionDescription
77
- JavadocMissingParamDescription
78
- JavadocMissingThrowsDescription
79
-
63
+ ClassJavadoc
64
+ JavadocConsecutiveEmptyLines
65
+ JavadocEmptyAuthorTag
66
+ JavadocEmptyExceptionTag
67
+ JavadocEmptyFirstLine
68
+ JavadocEmptyLastLine
69
+ JavadocEmptyParamTag
70
+ JavadocEmptyReturnTag
71
+ JavadocEmptySeeTag
72
+ JavadocEmptySinceTag
73
+ JavadocEmptyThrowsTag
74
+ JavadocEmptyVersionTag
75
+ JavadocMissingExceptionDescription
76
+ JavadocMissingParamDescription
77
+ JavadocMissingThrowsDescription
78
+
80
79
  // rulesets/concurrency.xml
81
- BusyWait
82
- DoubleCheckedLocking
83
- InconsistentPropertyLocking
84
- InconsistentPropertySynchronization
85
- NestedSynchronization
86
- StaticCalendarField
87
- StaticConnection
88
- StaticDateFormatField
89
- StaticMatcherField
90
- StaticSimpleDateFormatField
91
- SynchronizedMethod
92
- SynchronizedOnBoxedPrimitive
93
- SynchronizedOnGetClass
94
- SynchronizedOnReentrantLock
95
- SynchronizedOnString
96
- SynchronizedOnThis
97
- SynchronizedReadObjectMethod
98
- SystemRunFinalizersOnExit
99
- ThisReferenceEscapesConstructor
100
- ThreadGroup
101
- ThreadLocalNotStaticFinal
102
- ThreadYield
103
- UseOfNotifyMethod
104
- VolatileArrayField
105
- VolatileLongOrDoubleField
106
- WaitOutsideOfWhileLoop
107
-
80
+ BusyWait
81
+ DoubleCheckedLocking
82
+ InconsistentPropertyLocking
83
+ InconsistentPropertySynchronization
84
+ NestedSynchronization
85
+ StaticCalendarField
86
+ StaticConnection
87
+ StaticDateFormatField
88
+ StaticMatcherField
89
+ StaticSimpleDateFormatField
90
+ SynchronizedMethod
91
+ SynchronizedOnBoxedPrimitive
92
+ SynchronizedOnGetClass
93
+ SynchronizedOnReentrantLock
94
+ SynchronizedOnString
95
+ SynchronizedOnThis
96
+ SynchronizedReadObjectMethod
97
+ SystemRunFinalizersOnExit
98
+ ThisReferenceEscapesConstructor
99
+ ThreadGroup
100
+ ThreadLocalNotStaticFinal
101
+ ThreadYield
102
+ UseOfNotifyMethod
103
+ VolatileArrayField
104
+ VolatileLongOrDoubleField
105
+ WaitOutsideOfWhileLoop
106
+
108
107
  // rulesets/convention.xml
109
- CompileStatic
110
- ConfusingTernary
111
- CouldBeElvis
112
- CouldBeSwitchStatement
113
- FieldTypeRequired
114
- HashtableIsObsolete
115
- IfStatementCouldBeTernary
116
- ImplicitClosureParameter
117
- ImplicitReturnStatement
118
- InvertedCondition
119
- InvertedIfElse
120
- LongLiteralWithLowerCaseL
121
- MethodParameterTypeRequired
122
- MethodReturnTypeRequired
123
- NoDef
124
- NoDouble
125
- NoFloat
126
- NoJavaUtilDate
127
- NoTabCharacter
128
- ParameterReassignment
129
- PublicMethodsBeforeNonPublicMethods
130
- StaticFieldsBeforeInstanceFields
131
- StaticMethodsBeforeInstanceMethods
132
- TernaryCouldBeElvis
133
- TrailingComma
134
- VariableTypeRequired
135
- VectorIsObsolete
136
-
108
+ CompileStatic
109
+ ConfusingTernary
110
+ CouldBeElvis
111
+ CouldBeSwitchStatement
112
+ FieldTypeRequired
113
+ HashtableIsObsolete
114
+ IfStatementCouldBeTernary
115
+ ImplicitClosureParameter
116
+ ImplicitReturnStatement
117
+ InvertedCondition
118
+ InvertedIfElse
119
+ LongLiteralWithLowerCaseL
120
+ MethodParameterTypeRequired
121
+ MethodReturnTypeRequired
122
+ NoDef
123
+ NoDouble
124
+ NoFloat
125
+ NoJavaUtilDate
126
+ NoTabCharacter
127
+ ParameterReassignment
128
+ PublicMethodsBeforeNonPublicMethods
129
+ StaticFieldsBeforeInstanceFields
130
+ StaticMethodsBeforeInstanceMethods
131
+ TernaryCouldBeElvis
132
+ TrailingComma
133
+ VariableTypeRequired
134
+ VectorIsObsolete
135
+
137
136
  // rulesets/design.xml
138
- AbstractClassWithPublicConstructor
139
- AbstractClassWithoutAbstractMethod
140
- AssignmentToStaticFieldFromInstanceMethod
141
- BooleanMethodReturnsNull
142
- BuilderMethodWithSideEffects
143
- CloneableWithoutClone
144
- CloseWithoutCloseable
145
- CompareToWithoutComparable
146
- ConstantsOnlyInterface
147
- EmptyMethodInAbstractClass
148
- FinalClassWithProtectedMember
149
- ImplementationAsType
150
- Instanceof
151
- LocaleSetDefault
152
- NestedForLoop
153
- OptionalCollectionReturnType
154
- OptionalField
155
- OptionalMethodParameter
156
- PrivateFieldCouldBeFinal
157
- PublicInstanceField
158
- ReturnsNullInsteadOfEmptyArray
159
- ReturnsNullInsteadOfEmptyCollection
160
- SimpleDateFormatMissingLocale
161
- StatelessSingleton
162
- ToStringReturnsNull
163
-
137
+ AbstractClassWithPublicConstructor
138
+ AbstractClassWithoutAbstractMethod
139
+ AssignmentToStaticFieldFromInstanceMethod
140
+ BooleanMethodReturnsNull
141
+ BuilderMethodWithSideEffects
142
+ CloneableWithoutClone
143
+ CloseWithoutCloseable
144
+ CompareToWithoutComparable
145
+ ConstantsOnlyInterface
146
+ EmptyMethodInAbstractClass
147
+ FinalClassWithProtectedMember
148
+ ImplementationAsType
149
+ Instanceof
150
+ LocaleSetDefault
151
+ NestedForLoop
152
+ OptionalCollectionReturnType
153
+ OptionalField
154
+ OptionalMethodParameter
155
+ PrivateFieldCouldBeFinal
156
+ PublicInstanceField
157
+ ReturnsNullInsteadOfEmptyArray
158
+ ReturnsNullInsteadOfEmptyCollection
159
+ SimpleDateFormatMissingLocale
160
+ StatelessSingleton
161
+ ToStringReturnsNull
162
+
164
163
  // rulesets/dry.xml
165
- DuplicateListLiteral
166
- DuplicateMapLiteral
167
- DuplicateNumberLiteral
168
- DuplicateStringLiteral
169
-
164
+ DuplicateListLiteral
165
+ DuplicateMapLiteral
166
+ DuplicateNumberLiteral
167
+ DuplicateStringLiteral
168
+
170
169
  // rulesets/enhanced.xml
171
- CloneWithoutCloneable
172
- JUnitAssertEqualsConstantActualValue
173
- MissingOverrideAnnotation
174
- UnsafeImplementationAsMap
175
-
170
+ CloneWithoutCloneable
171
+ JUnitAssertEqualsConstantActualValue
172
+ MissingOverrideAnnotation
173
+ UnsafeImplementationAsMap
174
+
176
175
  // rulesets/exceptions.xml
177
- CatchArrayIndexOutOfBoundsException
178
- CatchError
179
- CatchException
180
- CatchIllegalMonitorStateException
181
- CatchIndexOutOfBoundsException
182
- CatchNullPointerException
183
- CatchRuntimeException
184
- CatchThrowable
185
- ConfusingClassNamedException
186
- ExceptionExtendsError
187
- ExceptionExtendsThrowable
188
- ExceptionNotThrown
189
- MissingNewInThrowStatement
190
- ReturnNullFromCatchBlock
191
- SwallowThreadDeath
192
- ThrowError
193
- ThrowException
194
- ThrowNullPointerException
195
- ThrowRuntimeException
196
- ThrowThrowable
197
-
176
+ CatchArrayIndexOutOfBoundsException
177
+ CatchError
178
+ CatchException
179
+ CatchIllegalMonitorStateException
180
+ CatchIndexOutOfBoundsException
181
+ CatchNullPointerException
182
+ CatchRuntimeException
183
+ CatchThrowable
184
+ ConfusingClassNamedException
185
+ ExceptionExtendsError
186
+ ExceptionExtendsThrowable
187
+ ExceptionNotThrown
188
+ MissingNewInThrowStatement
189
+ ReturnNullFromCatchBlock
190
+ SwallowThreadDeath
191
+ ThrowError
192
+ ThrowException
193
+ ThrowNullPointerException
194
+ ThrowRuntimeException
195
+ ThrowThrowable
196
+
198
197
  // rulesets/formatting.xml
199
- BlankLineBeforePackage
200
- BlockEndsWithBlankLine
201
- BlockStartsWithBlankLine
202
- BracesForClass
203
- BracesForForLoop
204
- BracesForIfElse
205
- BracesForMethod
206
- BracesForTryCatchFinally
207
- ClassEndsWithBlankLine
208
- ClassStartsWithBlankLine
209
- ClosureStatementOnOpeningLineOfMultipleLineClosure
210
- ConsecutiveBlankLines
211
- FileEndsWithoutNewline
212
- Indentation
213
- LineLength
214
- MissingBlankLineAfterImports
215
- MissingBlankLineAfterPackage
216
- MissingBlankLineBeforeAnnotatedField
217
- SpaceAfterCatch
218
- SpaceAfterClosingBrace
219
- SpaceAfterComma
220
- SpaceAfterFor
221
- SpaceAfterIf
222
- SpaceAfterMethodCallName
223
- SpaceAfterMethodDeclarationName
224
- SpaceAfterNotOperator
225
- SpaceAfterOpeningBrace
226
- SpaceAfterSemicolon
227
- SpaceAfterSwitch
228
- SpaceAfterWhile
229
- SpaceAroundClosureArrow
230
- SpaceAroundMapEntryColon
231
- SpaceAroundOperator
232
- SpaceBeforeClosingBrace
233
- SpaceBeforeOpeningBrace
234
- SpaceInsideParentheses
235
- TrailingWhitespace
236
-
198
+ BlankLineBeforePackage
199
+ BlockEndsWithBlankLine
200
+ BlockStartsWithBlankLine
201
+ BracesForClass
202
+ BracesForForLoop
203
+ BracesForIfElse
204
+ BracesForMethod
205
+ BracesForTryCatchFinally
206
+ ClassEndsWithBlankLine
207
+ ClassStartsWithBlankLine
208
+ ClosureStatementOnOpeningLineOfMultipleLineClosure
209
+ ConsecutiveBlankLines
210
+ FileEndsWithoutNewline
211
+ Indentation
212
+ LineLength
213
+ MissingBlankLineAfterImports
214
+ MissingBlankLineAfterPackage
215
+ MissingBlankLineBeforeAnnotatedField
216
+ SpaceAfterCatch
217
+ SpaceAfterClosingBrace
218
+ SpaceAfterComma
219
+ SpaceAfterFor
220
+ SpaceAfterIf
221
+ SpaceAfterMethodCallName
222
+ SpaceAfterMethodDeclarationName
223
+ SpaceAfterNotOperator
224
+ SpaceAfterOpeningBrace
225
+ SpaceAfterSemicolon
226
+ SpaceAfterSwitch
227
+ SpaceAfterWhile
228
+ SpaceAroundClosureArrow
229
+ SpaceAroundMapEntryColon
230
+ SpaceAroundOperator
231
+ SpaceBeforeClosingBrace
232
+ SpaceBeforeOpeningBrace
233
+ SpaceInsideParentheses
234
+ TrailingWhitespace
235
+
237
236
  // rulesets/generic.xml
238
- IllegalClassMember
239
- IllegalClassReference
240
- IllegalPackageReference
241
- IllegalRegex
242
- IllegalString
243
- IllegalSubclass
244
- RequiredRegex
245
- RequiredString
246
- StatelessClass
247
-
237
+ IllegalClassMember
238
+ IllegalClassReference
239
+ IllegalPackageReference
240
+ IllegalRegex
241
+ IllegalString
242
+ IllegalSubclass
243
+ RequiredRegex
244
+ RequiredString
245
+ StatelessClass
246
+
248
247
  // rulesets/grails.xml
249
- GrailsDomainGormMethods
250
- GrailsDomainHasEquals
251
- GrailsDomainHasToString
252
- GrailsDomainReservedSqlKeywordName
253
- GrailsDomainStringPropertyMaxSize
254
- GrailsDomainWithServiceReference
255
- GrailsDuplicateConstraint
256
- GrailsDuplicateMapping
257
- GrailsMassAssignment
258
- GrailsPublicControllerMethod
259
- GrailsServletContextReference
260
- GrailsStatelessService
261
-
248
+ GrailsDomainGormMethods
249
+ GrailsDomainHasEquals
250
+ GrailsDomainHasToString
251
+ GrailsDomainReservedSqlKeywordName
252
+ GrailsDomainStringPropertyMaxSize
253
+ GrailsDomainWithServiceReference
254
+ GrailsDuplicateConstraint
255
+ GrailsDuplicateMapping
256
+ GrailsMassAssignment
257
+ GrailsPublicControllerMethod
258
+ GrailsServletContextReference
259
+ GrailsStatelessService
260
+
262
261
  // rulesets/groovyism.xml
263
- AssignCollectionSort
264
- AssignCollectionUnique
265
- ClosureAsLastMethodParameter
266
- CollectAllIsDeprecated
267
- ConfusingMultipleReturns
268
- ExplicitArrayListInstantiation
269
- ExplicitCallToAndMethod
270
- ExplicitCallToCompareToMethod
271
- ExplicitCallToDivMethod
272
- ExplicitCallToEqualsMethod
273
- ExplicitCallToGetAtMethod
274
- ExplicitCallToLeftShiftMethod
275
- ExplicitCallToMinusMethod
276
- ExplicitCallToModMethod
277
- ExplicitCallToMultiplyMethod
278
- ExplicitCallToOrMethod
279
- ExplicitCallToPlusMethod
280
- ExplicitCallToPowerMethod
281
- ExplicitCallToPutAtMethod
282
- ExplicitCallToRightShiftMethod
283
- ExplicitCallToXorMethod
284
- ExplicitHashMapInstantiation
285
- ExplicitHashSetInstantiation
286
- ExplicitLinkedHashMapInstantiation
287
- ExplicitLinkedListInstantiation
288
- ExplicitStackInstantiation
289
- ExplicitTreeSetInstantiation
290
- GStringAsMapKey
291
- GStringExpressionWithinString
292
- GetterMethodCouldBeProperty
293
- GroovyLangImmutable
294
- UseCollectMany
295
- UseCollectNested
296
-
262
+ AssignCollectionSort
263
+ AssignCollectionUnique
264
+ ClosureAsLastMethodParameter
265
+ CollectAllIsDeprecated
266
+ ConfusingMultipleReturns
267
+ ExplicitArrayListInstantiation
268
+ ExplicitCallToAndMethod
269
+ ExplicitCallToCompareToMethod
270
+ ExplicitCallToDivMethod
271
+ ExplicitCallToEqualsMethod
272
+ ExplicitCallToGetAtMethod
273
+ ExplicitCallToLeftShiftMethod
274
+ ExplicitCallToMinusMethod
275
+ ExplicitCallToModMethod
276
+ ExplicitCallToMultiplyMethod
277
+ ExplicitCallToOrMethod
278
+ ExplicitCallToPlusMethod
279
+ ExplicitCallToPowerMethod
280
+ ExplicitCallToPutAtMethod
281
+ ExplicitCallToRightShiftMethod
282
+ ExplicitCallToXorMethod
283
+ ExplicitHashMapInstantiation
284
+ ExplicitHashSetInstantiation
285
+ ExplicitLinkedHashMapInstantiation
286
+ ExplicitLinkedListInstantiation
287
+ ExplicitStackInstantiation
288
+ ExplicitTreeSetInstantiation
289
+ GStringAsMapKey
290
+ GStringExpressionWithinString
291
+ GetterMethodCouldBeProperty
292
+ GroovyLangImmutable
293
+ UseCollectMany
294
+ UseCollectNested
295
+
297
296
  // rulesets/imports.xml
298
- DuplicateImport
299
- ImportFromSamePackage
300
- ImportFromSunPackages
301
- MisorderedStaticImports
302
- NoWildcardImports
303
- UnnecessaryGroovyImport
304
- UnusedImport
305
-
297
+ DuplicateImport
298
+ ImportFromSamePackage
299
+ ImportFromSunPackages
300
+ MisorderedStaticImports
301
+ NoWildcardImports
302
+ UnnecessaryGroovyImport
303
+ UnusedImport
304
+
306
305
  // rulesets/jdbc.xml
307
- DirectConnectionManagement
308
- JdbcConnectionReference
309
- JdbcResultSetReference
310
- JdbcStatementReference
311
-
306
+ DirectConnectionManagement
307
+ JdbcConnectionReference
308
+ JdbcResultSetReference
309
+ JdbcStatementReference
310
+
312
311
  // rulesets/junit.xml
313
- ChainedTest
314
- CoupledTestCase
315
- JUnitAssertAlwaysFails
316
- JUnitAssertAlwaysSucceeds
317
- JUnitFailWithoutMessage
318
- JUnitLostTest
319
- JUnitPublicField
320
- JUnitPublicNonTestMethod
321
- JUnitPublicProperty
322
- JUnitSetUpCallsSuper
323
- JUnitStyleAssertions
324
- JUnitTearDownCallsSuper
325
- JUnitTestMethodWithoutAssert
326
- JUnitUnnecessarySetUp
327
- JUnitUnnecessaryTearDown
328
- JUnitUnnecessaryThrowsException
329
- SpockIgnoreRestUsed
330
- UnnecessaryFail
331
- UseAssertEqualsInsteadOfAssertTrue
332
- UseAssertFalseInsteadOfNegation
333
- UseAssertNullInsteadOfAssertEquals
334
- UseAssertSameInsteadOfAssertTrue
335
- UseAssertTrueInsteadOfAssertEquals
336
- UseAssertTrueInsteadOfNegation
337
-
312
+ ChainedTest
313
+ CoupledTestCase
314
+ JUnitAssertAlwaysFails
315
+ JUnitAssertAlwaysSucceeds
316
+ JUnitFailWithoutMessage
317
+ JUnitLostTest
318
+ JUnitPublicField
319
+ JUnitPublicNonTestMethod
320
+ JUnitPublicProperty
321
+ JUnitSetUpCallsSuper
322
+ JUnitStyleAssertions
323
+ JUnitTearDownCallsSuper
324
+ JUnitTestMethodWithoutAssert
325
+ JUnitUnnecessarySetUp
326
+ JUnitUnnecessaryTearDown
327
+ JUnitUnnecessaryThrowsException
328
+ SpockIgnoreRestUsed
329
+ UnnecessaryFail
330
+ UseAssertEqualsInsteadOfAssertTrue
331
+ UseAssertFalseInsteadOfNegation
332
+ UseAssertNullInsteadOfAssertEquals
333
+ UseAssertSameInsteadOfAssertTrue
334
+ UseAssertTrueInsteadOfAssertEquals
335
+ UseAssertTrueInsteadOfNegation
336
+
338
337
  // rulesets/logging.xml
339
- LoggerForDifferentClass
340
- LoggerWithWrongModifiers
341
- LoggingSwallowsStacktrace
342
- MultipleLoggers
343
- PrintStackTrace
344
- Println
345
- SystemErrPrint
346
- SystemOutPrint
347
-
338
+ LoggerForDifferentClass
339
+ LoggerWithWrongModifiers
340
+ LoggingSwallowsStacktrace
341
+ MultipleLoggers
342
+ PrintStackTrace
343
+ Println
344
+ SystemErrPrint
345
+ SystemOutPrint
346
+
348
347
  // rulesets/naming.xml
349
- AbstractClassName
350
- ClassName
351
- ClassNameSameAsFilename
352
- ClassNameSameAsSuperclass
353
- ConfusingMethodName
354
- FactoryMethodName
355
- FieldName
356
- InterfaceName
357
- InterfaceNameSameAsSuperInterface
358
- MethodName
359
- ObjectOverrideMisspelledMethodName
360
- PackageName
361
- PackageNameMatchesFilePath
362
- ParameterName
363
- PropertyName
364
- VariableName
365
-
348
+ AbstractClassName
349
+ ClassName
350
+ ClassNameSameAsFilename
351
+ ClassNameSameAsSuperclass
352
+ ConfusingMethodName
353
+ FactoryMethodName
354
+ FieldName
355
+ InterfaceName
356
+ InterfaceNameSameAsSuperInterface
357
+ MethodName
358
+ ObjectOverrideMisspelledMethodName
359
+ PackageName
360
+ PackageNameMatchesFilePath
361
+ ParameterName
362
+ PropertyName
363
+ VariableName
364
+
366
365
  // rulesets/security.xml
367
- FileCreateTempFile
368
- InsecureRandom
369
- JavaIoPackageAccess
370
- NonFinalPublicField
371
- NonFinalSubclassOfSensitiveInterface
372
- ObjectFinalize
373
- PublicFinalizeMethod
374
- SystemExit
375
- UnsafeArrayDeclaration
376
-
366
+ FileCreateTempFile
367
+ InsecureRandom
368
+ JavaIoPackageAccess
369
+ NonFinalPublicField
370
+ NonFinalSubclassOfSensitiveInterface
371
+ ObjectFinalize
372
+ PublicFinalizeMethod
373
+ SystemExit
374
+ UnsafeArrayDeclaration
375
+
377
376
  // rulesets/serialization.xml
378
- EnumCustomSerializationIgnored
379
- SerialPersistentFields
380
- SerialVersionUID
381
- SerializableClassMustDefineSerialVersionUID
382
-
377
+ EnumCustomSerializationIgnored
378
+ SerialPersistentFields
379
+ SerialVersionUID
380
+ SerializableClassMustDefineSerialVersionUID
381
+
383
382
  // rulesets/size.xml
384
383
  AbcMetric // Requires the GMetrics jar
385
- ClassSize
384
+ ClassSize
386
385
  CrapMetric // Requires the GMetrics jar and a Cobertura coverage file
387
386
  CyclomaticComplexity // Requires the GMetrics jar
388
- MethodCount
389
- MethodSize
390
- NestedBlockDepth
391
- ParameterCount
392
-
387
+ MethodCount
388
+ MethodSize
389
+ NestedBlockDepth
390
+ ParameterCount
391
+
393
392
  // rulesets/unnecessary.xml
394
- AddEmptyString
395
- ConsecutiveLiteralAppends
396
- ConsecutiveStringConcatenation
397
- UnnecessaryBigDecimalInstantiation
398
- UnnecessaryBigIntegerInstantiation
399
- UnnecessaryBooleanExpression
400
- UnnecessaryBooleanInstantiation
401
- UnnecessaryCallForLastElement
402
- UnnecessaryCallToSubstring
403
- UnnecessaryCast
404
- UnnecessaryCatchBlock
405
- UnnecessaryCollectCall
406
- UnnecessaryCollectionCall
407
- UnnecessaryConstructor
408
- UnnecessaryDefInFieldDeclaration
409
- UnnecessaryDefInMethodDeclaration
410
- UnnecessaryDefInVariableDeclaration
411
- UnnecessaryDotClass
412
- UnnecessaryDoubleInstantiation
413
- UnnecessaryElseStatement
414
- UnnecessaryFinalOnPrivateMethod
415
- UnnecessaryFloatInstantiation
416
- UnnecessaryGString
417
- UnnecessaryGetter
418
- UnnecessaryIfStatement
419
- UnnecessaryInstanceOfCheck
420
- UnnecessaryInstantiationToGetClass
421
- UnnecessaryIntegerInstantiation
422
- UnnecessaryLongInstantiation
423
- UnnecessaryModOne
424
- UnnecessaryNullCheck
425
- UnnecessaryNullCheckBeforeInstanceOf
426
- UnnecessaryObjectReferences
427
- UnnecessaryOverridingMethod
428
- UnnecessaryPackageReference
429
- UnnecessaryParenthesesForMethodCallWithClosure
430
- UnnecessaryPublicModifier
431
- UnnecessaryReturnKeyword
432
- UnnecessarySafeNavigationOperator
433
- UnnecessarySelfAssignment
434
- UnnecessarySemicolon
435
- UnnecessarySetter
436
- UnnecessaryStringInstantiation
437
- UnnecessarySubstring
438
- UnnecessaryTernaryExpression
439
- UnnecessaryToString
440
- UnnecessaryTransientModifier
441
-
393
+ AddEmptyString
394
+ ConsecutiveLiteralAppends
395
+ ConsecutiveStringConcatenation
396
+ UnnecessaryBigDecimalInstantiation
397
+ UnnecessaryBigIntegerInstantiation
398
+ UnnecessaryBooleanExpression
399
+ UnnecessaryBooleanInstantiation
400
+ UnnecessaryCallForLastElement
401
+ UnnecessaryCallToSubstring
402
+ UnnecessaryCast
403
+ UnnecessaryCatchBlock
404
+ UnnecessaryCollectCall
405
+ UnnecessaryCollectionCall
406
+ UnnecessaryConstructor
407
+ UnnecessaryDefInFieldDeclaration
408
+ UnnecessaryDefInMethodDeclaration
409
+ UnnecessaryDefInVariableDeclaration
410
+ UnnecessaryDotClass
411
+ UnnecessaryDoubleInstantiation
412
+ UnnecessaryElseStatement
413
+ UnnecessaryFinalOnPrivateMethod
414
+ UnnecessaryFloatInstantiation
415
+ UnnecessaryGString
416
+ UnnecessaryGetter
417
+ UnnecessaryIfStatement
418
+ UnnecessaryInstanceOfCheck
419
+ UnnecessaryInstantiationToGetClass
420
+ UnnecessaryIntegerInstantiation
421
+ UnnecessaryLongInstantiation
422
+ UnnecessaryModOne
423
+ UnnecessaryNullCheck
424
+ UnnecessaryNullCheckBeforeInstanceOf
425
+ UnnecessaryObjectReferences
426
+ UnnecessaryOverridingMethod
427
+ UnnecessaryPackageReference
428
+ UnnecessaryParenthesesForMethodCallWithClosure
429
+ UnnecessaryPublicModifier
430
+ UnnecessaryReturnKeyword
431
+ UnnecessarySafeNavigationOperator
432
+ UnnecessarySelfAssignment
433
+ UnnecessarySemicolon
434
+ UnnecessarySetter
435
+ UnnecessaryStringInstantiation
436
+ UnnecessaryTernaryExpression
437
+ UnnecessaryToString
438
+ UnnecessaryTransientModifier
439
+
442
440
  // rulesets/unused.xml
443
- UnusedArray
444
- UnusedMethodParameter
445
- UnusedObject
446
- UnusedPrivateField
447
- UnusedPrivateMethod
448
- UnusedPrivateMethodParameter
449
- UnusedVariable
450
-
451
-
452
- }
441
+ UnusedArray
442
+ UnusedMethodParameter
443
+ UnusedObject
444
+ UnusedPrivateField
445
+ UnusedPrivateMethod
446
+ UnusedPrivateMethodParameter
447
+ UnusedVariable
448
+ }