fabric-loom/codenarc.groovy
modmuss50 3ded0964c4
Refactor and improve tests (#466)
* Install and run a production server in tests

* Small improvements

* Add FabricAPI build test
Create new GradleProjectTestTrait replacing the old trait
Improve groovy code formatting.

* Refactor tests

* Fix MultiProjectTest + fix logging for fabric api test

* Cleanup and fixes

* Update fabric api + run in parallel for speed

* Set server memory + fix error
2021-08-31 11:48:58 +01:00

73 lines
1.8 KiB
Groovy

ruleset {
UnnecessarySemicolon
BlockEndsWithBlankLine
BlockStartsWithBlankLine
ConsecutiveBlankLines
MissingBlankLineAfterImports
MissingBlankLineAfterPackage
// Braces
BracesForClass
BracesForForLoop
BracesForIfElse
BracesForMethod
BracesForTryCatchFinally
// Spaces
SpaceAfterCatch
SpaceAfterComma
SpaceAfterClosingBrace
SpaceAfterFor
SpaceAfterIf
SpaceAfterOpeningBrace
SpaceAfterSemicolon
SpaceAfterSwitch
SpaceAfterWhile
SpaceAroundClosureArrow
SpaceAroundMapEntryColon(characterAfterColonRegex: /\ /)
SpaceAroundOperator
SpaceBeforeClosingBrace
SpaceBeforeOpeningBrace
TrailingWhitespace
// Groovyism - See: https://codenarc.org/codenarc-rules-groovyism.html
ClosureAsLastMethodParameter
ExplicitArrayListInstantiation
ExplicitCallToAndMethod
ExplicitCallToCompareToMethod
ExplicitCallToDivMethod
ExplicitCallToEqualsMethod
ExplicitCallToGetAtMethod
ExplicitCallToLeftShiftMethod
ExplicitCallToMinusMethod
ExplicitCallToMultiplyMethod
ExplicitCallToModMethod
ExplicitCallToOrMethod
ExplicitCallToPlusMethod
ExplicitCallToPowerMethod
ExplicitCallToRightShiftMethod
ExplicitCallToXorMethod
ExplicitHashMapInstantiation
ExplicitLinkedHashMapInstantiation
ExplicitHashSetInstantiation
ExplicitLinkedListInstantiation
ExplicitStackInstantiation
ExplicitTreeSetInstantiation
GetterMethodCouldBeProperty
GStringAsMapKey
GStringExpressionWithinString
CouldBeElvis
TernaryCouldBeElvis
FieldTypeRequired
MethodParameterTypeRequired
// Imports
UnusedImport
UnnecessaryGroovyImport
NoWildcardImports(ignoreStaticImports: true)
ImportFromSamePackage
DuplicateImport
//Misc
LongLiteralWithLowerCaseL
}