npm-groovy-lint 8.2.0 → 9.3.0

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 (42) hide show
  1. package/CHANGELOG.md +24 -1
  2. package/README.md +8 -5
  3. package/lib/.groovylintrc-all.json +6 -0
  4. package/lib/codenarc-caller.js +16 -8
  5. package/lib/config.js +2 -2
  6. package/lib/example/RuleSet-All.groovy +417 -409
  7. package/lib/example/SampleFile.groovy +0 -8
  8. package/lib/example/SampleFileSmall.groovy +0 -6
  9. package/lib/example/SampleFileSmallFixed.txt +0 -5
  10. package/lib/example/SampleFileSmallFormatted.txt +0 -6
  11. package/lib/groovy-lint-fix.js +0 -2
  12. package/lib/groovy-lint.js +0 -2
  13. package/lib/java/CodeNarc-2.2.0.jar +0 -0
  14. package/lib/java/CodeNarcServer.jar +0 -0
  15. package/lib/java/groovy/lib/{ant-1.10.8.jar → ant-1.10.11.jar} +0 -0
  16. package/lib/java/groovy/lib/ant-launcher-1.10.11.jar +0 -0
  17. package/lib/java/groovy/lib/{groovy-3.0.5.jar → groovy-3.0.9.jar} +0 -0
  18. package/lib/java/groovy/lib/{groovy-ant-3.0.5.jar → groovy-ant-3.0.9.jar} +0 -0
  19. package/lib/java/groovy/lib/{groovy-json-3.0.5.jar → groovy-json-3.0.9.jar} +0 -0
  20. package/lib/java/groovy/lib/{groovy-templates-3.0.5.jar → groovy-templates-3.0.9.jar} +0 -0
  21. package/lib/java/groovy/lib/{groovy-xml-3.0.5.jar → groovy-xml-3.0.9.jar} +0 -0
  22. package/lib/java/log4j-api-2.17.1.jar +0 -0
  23. package/lib/java/log4j-core-2.17.1.jar +0 -0
  24. package/lib/java/log4j-slf4j-impl-2.17.1.jar +0 -0
  25. package/package.json +16 -14
  26. package/lib/java/CodeNarc-2.0.0.jar +0 -0
  27. package/lib/java/groovy/lib/ant-launcher-1.10.8.jar +0 -0
  28. package/lib/java/log4j-api-2.13.0.jar +0 -0
  29. package/lib/java/log4j-core-2.13.0.jar +0 -0
  30. package/lib/java/log4j-slf4j-impl-2.13.0.jar +0 -0
  31. package/lib/test/errors.test.js +0 -92
  32. package/lib/test/helpers/common.js +0 -84
  33. package/lib/test/helpers/init.js +0 -29
  34. package/lib/test/lint-api.test.js +0 -221
  35. package/lib/test/lint-build-fix.test.js +0 -43
  36. package/lib/test/lint-build-format.test.js +0 -43
  37. package/lib/test/lint-build.test.js +0 -168
  38. package/lib/test/lint-comments.test.js +0 -197
  39. package/lib/test/lint-fix.rules.test.js +0 -71
  40. package/lib/test/lint-fix.test.js +0 -224
  41. package/lib/test/lint-format.test.js +0 -293
  42. package/lib/test/miscellaneous.test.js +0 -326
@@ -1,7 +1,7 @@
1
1
  /* groovylint-disable CompileStatic */
2
2
  // More info there : http://codenarc.github.io/CodeNarc/codenarc-creating-ruleset.html
3
-
4
3
  ruleset {
4
+
5
5
  description '''
6
6
  A Sample Groovy RuleSet containing all CodeNarc Rules, grouped by category.
7
7
  You can use this as a template for your own custom RuleSet.
@@ -9,436 +9,444 @@ ruleset {
9
9
  '''
10
10
 
11
11
  // 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
- RandomDoubleCoercedToZero
52
- RemoveAllOnSelf
53
- ReturnFromFinallyBlock
54
- ThrowExceptionFromFinallyBlock
55
-
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
+
56
57
  // rulesets/braces.xml
57
- ElseBlockBraces
58
- ForStatementBraces
59
- IfStatementBraces
60
- WhileStatementBraces
61
-
58
+ ElseBlockBraces
59
+ ForStatementBraces
60
+ IfStatementBraces
61
+ WhileStatementBraces
62
+
62
63
  // rulesets/comments.xml
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
-
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
+
79
80
  // rulesets/concurrency.xml
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
-
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
+
107
108
  // rulesets/convention.xml
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
-
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
+
136
137
  // rulesets/design.xml
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
-
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
+
163
164
  // rulesets/dry.xml
164
- DuplicateListLiteral
165
- DuplicateMapLiteral
166
- DuplicateNumberLiteral
167
- DuplicateStringLiteral
168
-
165
+ DuplicateListLiteral
166
+ DuplicateMapLiteral
167
+ DuplicateNumberLiteral
168
+ DuplicateStringLiteral
169
+
169
170
  // rulesets/enhanced.xml
170
- CloneWithoutCloneable
171
- JUnitAssertEqualsConstantActualValue
172
- MissingOverrideAnnotation
173
- UnsafeImplementationAsMap
174
-
171
+ CloneWithoutCloneable
172
+ JUnitAssertEqualsConstantActualValue
173
+ MissingOverrideAnnotation
174
+ UnsafeImplementationAsMap
175
+
175
176
  // rulesets/exceptions.xml
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
-
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
+
197
198
  // rulesets/formatting.xml
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
- SpaceAfterCatch
216
- SpaceAfterClosingBrace
217
- SpaceAfterComma
218
- SpaceAfterFor
219
- SpaceAfterIf
220
- SpaceAfterOpeningBrace
221
- SpaceAfterSemicolon
222
- SpaceAfterSwitch
223
- SpaceAfterWhile
224
- SpaceAroundClosureArrow
225
- SpaceAroundMapEntryColon
226
- SpaceAroundOperator
227
- SpaceBeforeClosingBrace
228
- SpaceBeforeOpeningBrace
229
- TrailingWhitespace
230
-
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
+
231
237
  // rulesets/generic.xml
232
- IllegalClassMember
233
- IllegalClassReference
234
- IllegalPackageReference
235
- IllegalRegex
236
- IllegalString
237
- IllegalSubclass
238
- RequiredRegex
239
- RequiredString
240
- StatelessClass
241
-
238
+ IllegalClassMember
239
+ IllegalClassReference
240
+ IllegalPackageReference
241
+ IllegalRegex
242
+ IllegalString
243
+ IllegalSubclass
244
+ RequiredRegex
245
+ RequiredString
246
+ StatelessClass
247
+
242
248
  // rulesets/grails.xml
243
- GrailsDomainGormMethods
244
- GrailsDomainHasEquals
245
- GrailsDomainHasToString
246
- GrailsDomainReservedSqlKeywordName
247
- GrailsDomainStringPropertyMaxSize
248
- GrailsDomainWithServiceReference
249
- GrailsDuplicateConstraint
250
- GrailsDuplicateMapping
251
- GrailsMassAssignment
252
- GrailsPublicControllerMethod
253
- GrailsServletContextReference
254
- GrailsStatelessService
255
-
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
+
256
262
  // rulesets/groovyism.xml
257
- AssignCollectionSort
258
- AssignCollectionUnique
259
- ClosureAsLastMethodParameter
260
- CollectAllIsDeprecated
261
- ConfusingMultipleReturns
262
- ExplicitArrayListInstantiation
263
- ExplicitCallToAndMethod
264
- ExplicitCallToCompareToMethod
265
- ExplicitCallToDivMethod
266
- ExplicitCallToEqualsMethod
267
- ExplicitCallToGetAtMethod
268
- ExplicitCallToLeftShiftMethod
269
- ExplicitCallToMinusMethod
270
- ExplicitCallToModMethod
271
- ExplicitCallToMultiplyMethod
272
- ExplicitCallToOrMethod
273
- ExplicitCallToPlusMethod
274
- ExplicitCallToPowerMethod
275
- ExplicitCallToPutAtMethod
276
- ExplicitCallToRightShiftMethod
277
- ExplicitCallToXorMethod
278
- ExplicitHashMapInstantiation
279
- ExplicitHashSetInstantiation
280
- ExplicitLinkedHashMapInstantiation
281
- ExplicitLinkedListInstantiation
282
- ExplicitStackInstantiation
283
- ExplicitTreeSetInstantiation
284
- GStringAsMapKey
285
- GStringExpressionWithinString
286
- GetterMethodCouldBeProperty
287
- GroovyLangImmutable
288
- UseCollectMany
289
- UseCollectNested
290
-
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
+
291
297
  // rulesets/imports.xml
292
- DuplicateImport
293
- ImportFromSamePackage
294
- ImportFromSunPackages
295
- MisorderedStaticImports
296
- NoWildcardImports
297
- UnnecessaryGroovyImport
298
- UnusedImport
299
-
298
+ DuplicateImport
299
+ ImportFromSamePackage
300
+ ImportFromSunPackages
301
+ MisorderedStaticImports
302
+ NoWildcardImports
303
+ UnnecessaryGroovyImport
304
+ UnusedImport
305
+
300
306
  // rulesets/jdbc.xml
301
- DirectConnectionManagement
302
- JdbcConnectionReference
303
- JdbcResultSetReference
304
- JdbcStatementReference
305
-
307
+ DirectConnectionManagement
308
+ JdbcConnectionReference
309
+ JdbcResultSetReference
310
+ JdbcStatementReference
311
+
306
312
  // rulesets/junit.xml
307
- ChainedTest
308
- CoupledTestCase
309
- JUnitAssertAlwaysFails
310
- JUnitAssertAlwaysSucceeds
311
- JUnitFailWithoutMessage
312
- JUnitLostTest
313
- JUnitPublicField
314
- JUnitPublicNonTestMethod
315
- JUnitPublicProperty
316
- JUnitSetUpCallsSuper
317
- JUnitStyleAssertions
318
- JUnitTearDownCallsSuper
319
- JUnitTestMethodWithoutAssert
320
- JUnitUnnecessarySetUp
321
- JUnitUnnecessaryTearDown
322
- JUnitUnnecessaryThrowsException
323
- SpockIgnoreRestUsed
324
- UnnecessaryFail
325
- UseAssertEqualsInsteadOfAssertTrue
326
- UseAssertFalseInsteadOfNegation
327
- UseAssertNullInsteadOfAssertEquals
328
- UseAssertSameInsteadOfAssertTrue
329
- UseAssertTrueInsteadOfAssertEquals
330
- UseAssertTrueInsteadOfNegation
331
-
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
+
332
338
  // rulesets/logging.xml
333
- LoggerForDifferentClass
334
- LoggerWithWrongModifiers
335
- LoggingSwallowsStacktrace
336
- MultipleLoggers
337
- PrintStackTrace
338
- Println
339
- SystemErrPrint
340
- SystemOutPrint
341
-
339
+ LoggerForDifferentClass
340
+ LoggerWithWrongModifiers
341
+ LoggingSwallowsStacktrace
342
+ MultipleLoggers
343
+ PrintStackTrace
344
+ Println
345
+ SystemErrPrint
346
+ SystemOutPrint
347
+
342
348
  // rulesets/naming.xml
343
- AbstractClassName
344
- ClassName
345
- ClassNameSameAsFilename
346
- ClassNameSameAsSuperclass
347
- ConfusingMethodName
348
- FactoryMethodName
349
- FieldName
350
- InterfaceName
351
- InterfaceNameSameAsSuperInterface
352
- MethodName
353
- ObjectOverrideMisspelledMethodName
354
- PackageName
355
- PackageNameMatchesFilePath
356
- ParameterName
357
- PropertyName
358
- VariableName
359
-
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
+
360
366
  // rulesets/security.xml
361
- FileCreateTempFile
362
- InsecureRandom
363
- JavaIoPackageAccess
364
- NonFinalPublicField
365
- NonFinalSubclassOfSensitiveInterface
366
- ObjectFinalize
367
- PublicFinalizeMethod
368
- SystemExit
369
- UnsafeArrayDeclaration
370
-
367
+ FileCreateTempFile
368
+ InsecureRandom
369
+ JavaIoPackageAccess
370
+ NonFinalPublicField
371
+ NonFinalSubclassOfSensitiveInterface
372
+ ObjectFinalize
373
+ PublicFinalizeMethod
374
+ SystemExit
375
+ UnsafeArrayDeclaration
376
+
371
377
  // rulesets/serialization.xml
372
- EnumCustomSerializationIgnored
373
- SerialPersistentFields
374
- SerialVersionUID
375
- SerializableClassMustDefineSerialVersionUID
376
-
378
+ EnumCustomSerializationIgnored
379
+ SerialPersistentFields
380
+ SerialVersionUID
381
+ SerializableClassMustDefineSerialVersionUID
382
+
377
383
  // rulesets/size.xml
378
384
  AbcMetric // Requires the GMetrics jar
379
- ClassSize
385
+ ClassSize
380
386
  CrapMetric // Requires the GMetrics jar and a Cobertura coverage file
381
387
  CyclomaticComplexity // Requires the GMetrics jar
382
- MethodCount
383
- MethodSize
384
- NestedBlockDepth
385
- ParameterCount
386
-
388
+ MethodCount
389
+ MethodSize
390
+ NestedBlockDepth
391
+ ParameterCount
392
+
387
393
  // rulesets/unnecessary.xml
388
- AddEmptyString
389
- ConsecutiveLiteralAppends
390
- ConsecutiveStringConcatenation
391
- UnnecessaryBigDecimalInstantiation
392
- UnnecessaryBigIntegerInstantiation
393
- UnnecessaryBooleanExpression
394
- UnnecessaryBooleanInstantiation
395
- UnnecessaryCallForLastElement
396
- UnnecessaryCallToSubstring
397
- UnnecessaryCast
398
- UnnecessaryCatchBlock
399
- UnnecessaryCollectCall
400
- UnnecessaryCollectionCall
401
- UnnecessaryConstructor
402
- UnnecessaryDefInFieldDeclaration
403
- UnnecessaryDefInMethodDeclaration
404
- UnnecessaryDefInVariableDeclaration
405
- UnnecessaryDotClass
406
- UnnecessaryDoubleInstantiation
407
- UnnecessaryElseStatement
408
- UnnecessaryFinalOnPrivateMethod
409
- UnnecessaryFloatInstantiation
410
- UnnecessaryGString
411
- UnnecessaryGetter
412
- UnnecessaryIfStatement
413
- UnnecessaryInstanceOfCheck
414
- UnnecessaryInstantiationToGetClass
415
- UnnecessaryIntegerInstantiation
416
- UnnecessaryLongInstantiation
417
- UnnecessaryModOne
418
- UnnecessaryNullCheck
419
- UnnecessaryNullCheckBeforeInstanceOf
420
- UnnecessaryObjectReferences
421
- UnnecessaryOverridingMethod
422
- UnnecessaryPackageReference
423
- UnnecessaryParenthesesForMethodCallWithClosure
424
- UnnecessaryPublicModifier
425
- UnnecessaryReturnKeyword
426
- UnnecessarySafeNavigationOperator
427
- UnnecessarySelfAssignment
428
- UnnecessarySemicolon
429
- UnnecessarySetter
430
- UnnecessaryStringInstantiation
431
- UnnecessarySubstring
432
- UnnecessaryTernaryExpression
433
- UnnecessaryToString
434
- UnnecessaryTransientModifier
435
-
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
+
436
442
  // rulesets/unused.xml
437
- UnusedArray
438
- UnusedMethodParameter
439
- UnusedObject
440
- UnusedPrivateField
441
- UnusedPrivateMethod
442
- UnusedPrivateMethodParameter
443
- UnusedVariable
444
- }
443
+ UnusedArray
444
+ UnusedMethodParameter
445
+ UnusedObject
446
+ UnusedPrivateField
447
+ UnusedPrivateMethod
448
+ UnusedPrivateMethodParameter
449
+ UnusedVariable
450
+
451
+
452
+ }