11/*
2- * Copyright 2019-2022 Björn Kautler
2+ * Copyright 2019-2023 Björn Kautler
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -73,6 +73,7 @@ ruleset {
7373 HardCodedWindowsRootDirectory
7474 IntegerGetInteger
7575 MultipleUnaryOperators
76+ ParameterAssignmentInFilterClosure
7677 RandomDoubleCoercedToZero
7778 RemoveAllOnSelf
7879 ReturnFromFinallyBlock
@@ -137,12 +138,20 @@ ruleset {
137138 // FieldTypeRequired
138139 HashtableIsObsolete
139140 IfStatementCouldBeTernary
141+ // ImplicitClosureParameter
142+ // ImplicitReturnStatement
140143 InvertedCondition
141144 InvertedIfElse
142145 LongLiteralWithLowerCaseL
143146 // MethodParameterTypeRequired
144147 // MethodReturnTypeRequired
145148 // NoDef
149+ NoDouble {
150+ doNotApplyToClassNames = ' net.kautler.test.PrivateFinalFieldSetterCategory'
151+ }
152+ NoFloat {
153+ doNotApplyToClassNames = ' net.kautler.test.PrivateFinalFieldSetterCategory'
154+ }
146155 NoJavaUtilDate
147156 NoTabCharacter
148157 // ParameterReassignment
@@ -177,6 +186,9 @@ ruleset {
177186 }
178187 LocaleSetDefault
179188 NestedForLoop
189+ OptionalCollectionReturnType
190+ OptionalField
191+ OptionalMethodParameter
180192 PrivateFieldCouldBeFinal
181193 PublicInstanceField
182194 ReturnsNullInsteadOfEmptyArray
@@ -237,17 +249,15 @@ ruleset {
237249 // LineLength
238250 MissingBlankLineAfterImports
239251 MissingBlankLineAfterPackage
252+ MissingBlankLineBeforeAnnotatedField
240253 SpaceAfterCatch
241- SpaceAfterClosingBrace {
242- // work-around for https://github.com/CodeNarc/CodeNarc/issues/452
243- doNotApplyToClassNames = [
244- ' net.kautler.command.integ.test.javacord.spock.JavacordExtension' ,
245- ' net.kautler.command.integ.test.jda.spock.JdaExtension'
246- ]. join(' , ' )
247- }
254+ SpaceAfterClosingBrace
248255 SpaceAfterComma
249256 SpaceAfterFor
250257 SpaceAfterIf
258+ SpaceAfterMethodCallName
259+ SpaceAfterMethodDeclarationName
260+ SpaceAfterNotOperator
251261 SpaceAfterOpeningBrace
252262 SpaceAfterSemicolon
253263 SpaceAfterSwitch
@@ -258,12 +268,8 @@ ruleset {
258268 }
259269 SpaceAroundOperator
260270 SpaceBeforeClosingBrace
261- SpaceBeforeOpeningBrace {
262- doNotApplyToClassNames = [
263- ' net.kautler.command.util.lazy.LazyReferenceByFunctionTest$1' ,
264- ' net.kautler.command.util.lazy.LazyReferenceBySupplierTest$1'
265- ]. join(' , ' )
266- }
271+ SpaceBeforeOpeningBrace
272+ SpaceInsideParentheses
267273 TrailingWhitespace
268274
269275 // rulesets/generic.xml
@@ -278,6 +284,7 @@ ruleset {
278284 StatelessClass
279285
280286 // rulesets/grails.xml
287+ GrailsDomainGormMethods
281288 GrailsDomainHasEquals
282289 GrailsDomainHasToString
283290 GrailsDomainReservedSqlKeywordName
@@ -337,12 +344,7 @@ ruleset {
337344 ExplicitTreeSetInstantiation
338345 GStringAsMapKey
339346 GStringExpressionWithinString
340- GetterMethodCouldBeProperty {
341- doNotApplyToClassNames = [
342- ' net.kautler.command.integ.test.javacord.restriction.RestrictionChainElementIntegTest$PingCommand' ,
343- ' net.kautler.command.integ.test.jda.restriction.RestrictionChainElementIntegTest$PingCommand'
344- ]. join(' , ' )
345- }
347+ GetterMethodCouldBeProperty
346348 GroovyLangImmutable
347349 UseCollectMany
348350 UseCollectNested
0 commit comments