Skip to content

Commit b5136c1

Browse files
committed
Update Checkstyle Configuration and Codenarc Rules
1 parent 4ee3f74 commit b5136c1

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

gradle/checkstyle/checkstyle.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
<property name="processJavadoc" value="true"/>
7373
</module>
7474
<module name="ImportOrder">
75-
<property name="groups" value="java,/^javax?\./,*,grails,org.grails"/>
75+
<property name="groups" value="java,/^javax?\./,/^jakarta?\./,*,grails,org.grails"/>
7676
<property name="ordered" value="true"/>
7777
<property name="separated" value="true"/>
7878
<property name="option" value="top"/>

gradle/codenarc/codenarc.groovy

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ruleset {
1414
BrokenOddnessCheck
1515
// ClassForName
1616
ComparisonOfTwoConstants
17-
ComparisonWithSelf
17+
// ComparisonWithSelf
1818
ConstantAssertExpression
1919
ConstantIfExpression
2020
ConstantTernaryExpression
@@ -24,7 +24,7 @@ ruleset {
2424
DuplicateMapKey
2525
DuplicateSetValue
2626
EmptyCatchBlock
27-
EmptyClass
27+
// EmptyClass
2828
EmptyElseBlock
2929
EmptyFinallyBlock
3030
EmptyForStatement
@@ -35,7 +35,7 @@ ruleset {
3535
EmptySwitchStatement
3636
EmptySynchronizedStatement
3737
EmptyTryBlock
38-
EmptyWhileStatement
38+
// EmptyWhileStatement
3939
// EqualsAndHashCode
4040
EqualsOverloaded
4141
ExplicitGarbageCollection
@@ -112,7 +112,7 @@ ruleset {
112112
// ImplicitClosureParameter
113113
// ImplicitReturnStatement
114114
InvertedCondition
115-
InvertedIfElse
115+
// InvertedIfElse
116116
// LongLiteralWithLowerCaseL
117117
// MethodParameterTypeRequired
118118
// MethodReturnTypeRequired
@@ -206,27 +206,27 @@ ruleset {
206206
ConsecutiveBlankLines
207207
FileEndsWithoutNewline
208208
Indentation
209-
LineLength(length: 150)
209+
LineLength(length: 350)
210210
MissingBlankLineAfterImports
211211
MissingBlankLineAfterPackage
212212
MissingBlankLineBeforeAnnotatedField
213213
SpaceAfterCatch
214-
SpaceAfterClosingBrace
214+
// SpaceAfterClosingBrace
215215
SpaceAfterComma
216216
SpaceAfterFor
217217
SpaceAfterIf
218218
SpaceAfterMethodCallName
219219
SpaceAfterMethodDeclarationName
220220
SpaceAfterNotOperator
221-
SpaceAfterOpeningBrace
221+
// SpaceAfterOpeningBrace
222222
SpaceAfterSemicolon
223223
SpaceAfterSwitch
224224
SpaceAfterWhile
225225
SpaceAroundClosureArrow
226-
SpaceAroundMapEntryColon(characterAfterColonRegex: /\s/)
226+
// SpaceAroundMapEntryColon(characterAfterColonRegex: /\s/)
227227
SpaceAroundOperator
228-
SpaceBeforeClosingBrace
229-
SpaceBeforeOpeningBrace
228+
// SpaceBeforeClosingBrace
229+
// SpaceBeforeOpeningBrace
230230
SpaceInsideParentheses
231231
TrailingWhitespace
232232

@@ -351,13 +351,13 @@ ruleset {
351351
FieldName(ignoreFieldNames: 'serialVersionUID,log,logger')
352352
InterfaceName
353353
InterfaceNameSameAsSuperInterface
354-
MethodName
354+
MethodName(regex: '[a-z]\\w*|.*[ #].*')
355355
ObjectOverrideMisspelledMethodName
356356
PackageName
357357
PackageNameMatchesFilePath
358358
ParameterName
359-
PropertyName
360-
VariableName
359+
PropertyName(regex: '[a-z_][a-zA-Z0-9_]*')
360+
VariableName(regex: '[a-z_][a-zA-Z0-9_]*')
361361

362362
// rulesets/security.xml
363363
// FileCreateTempFile
@@ -392,7 +392,7 @@ ruleset {
392392
ConsecutiveStringConcatenation
393393
UnnecessaryBigDecimalInstantiation
394394
UnnecessaryBigIntegerInstantiation
395-
UnnecessaryBooleanExpression
395+
// UnnecessaryBooleanExpression
396396
UnnecessaryBooleanInstantiation
397397
UnnecessaryCallForLastElement
398398
UnnecessaryCallToSubstring
@@ -406,7 +406,7 @@ ruleset {
406406
UnnecessaryDefInVariableDeclaration
407407
UnnecessaryDotClass
408408
UnnecessaryDoubleInstantiation
409-
UnnecessaryElseStatement
409+
// UnnecessaryElseStatement
410410
UnnecessaryFinalOnPrivateMethod
411411
UnnecessaryFloatInstantiation
412412
UnnecessaryGString
@@ -424,7 +424,7 @@ ruleset {
424424
UnnecessaryPackageReference
425425
UnnecessaryParenthesesForMethodCallWithClosure
426426
UnnecessaryPublicModifier
427-
UnnecessaryReturnKeyword
427+
// UnnecessaryReturnKeyword
428428
UnnecessarySafeNavigationOperator
429429
UnnecessarySelfAssignment
430430
UnnecessarySemicolon

0 commit comments

Comments
 (0)