123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411 |
- ruleset {
- // rulesets/basic.xml
- /*
- AssertWithinFinallyBlock
- AssignmentInConditional
- BigDecimalInstantiation
- BitwiseOperatorInConditional
- BooleanGetBoolean
- BrokenNullCheck
- BrokenOddnessCheck
- ClassForName
- ComparisonOfTwoConstants
- ComparisonWithSelf
- ConstantAssertExpression
- ConstantIfExpression
- ConstantTernaryExpression
- DeadCode
- DoubleNegative
- DuplicateCaseStatement
- DuplicateMapKey
- DuplicateSetValue
- EmptyCatchBlock
- EmptyClass
- EmptyElseBlock
- EmptyFinallyBlock
- EmptyForStatement
- EmptyIfStatement
- EmptyInstanceInitializer
- EmptyMethod
- EmptyStaticInitializer
- EmptySwitchStatement
- EmptySynchronizedStatement
- EmptyTryBlock
- EmptyWhileStatement
- EqualsAndHashCode
- EqualsOverloaded
- ExplicitGarbageCollection
- ForLoopShouldBeWhileLoop
- HardCodedWindowsFileSeparator
- HardCodedWindowsRootDirectory
- IntegerGetInteger
- RandomDoubleCoercedToZero
- RemoveAllOnSelf
- ReturnFromFinallyBlock
- ThrowExceptionFromFinallyBlock
- */
- // rulesets/braces.xml
- ElseBlockBraces
- ForStatementBraces
- IfStatementBraces
- WhileStatementBraces
- // rulesets/concurrency.xml
- /*
- BusyWait
- DoubleCheckedLocking
- InconsistentPropertyLocking
- InconsistentPropertySynchronization
- NestedSynchronization
- StaticCalendarField
- StaticConnection
- StaticDateFormatField
- StaticMatcherField
- StaticSimpleDateFormatField
- SynchronizedMethod
- SynchronizedOnBoxedPrimitive
- SynchronizedOnGetClass
- SynchronizedOnReentrantLock
- SynchronizedOnString
- SynchronizedOnThis
- SynchronizedReadObjectMethod
- SystemRunFinalizersOnExit
- ThisReferenceEscapesConstructor
- ThreadGroup
- ThreadLocalNotStaticFinal
- ThreadYield
- UseOfNotifyMethod
- VolatileArrayField
- VolatileLongOrDoubleField
- WaitOutsideOfWhileLoop
- */
- // rulesets/convention.xml
- /*
- ConfusingTernary
- CouldBeElvis
- HashtableIsObsolete
- IfStatementCouldBeTernary
- InvertedIfElse
- LongLiteralWithLowerCaseL
- ParameterReassignment
- TernaryCouldBeElvis
- VectorIsObsolete
- */
- // rulesets/design.xml
- /*
- AbstractClassWithPublicConstructor
- AbstractClassWithoutAbstractMethod
- BooleanMethodReturnsNull
- BuilderMethodWithSideEffects
- CloneableWithoutClone
- CloseWithoutCloseable
- CompareToWithoutComparable
- ConstantsOnlyInterface
- EmptyMethodInAbstractClass
- FinalClassWithProtectedMember
- ImplementationAsType
- LocaleSetDefault
- PrivateFieldCouldBeFinal
- PublicInstanceField
- ReturnsNullInsteadOfEmptyArray
- ReturnsNullInsteadOfEmptyCollection
- SimpleDateFormatMissingLocale
- StatelessSingleton
- */
- // rulesets/dry.xml
- /*
- DuplicateListLiteral
- DuplicateMapLiteral
- DuplicateNumberLiteral
- DuplicateStringLiteral
- */
- // rulesets/enhanced.xml
- /*
- CloneWithoutCloneable
- JUnitAssertEqualsConstantActualValue
- UnsafeImplementationAsMap
- */
- // rulesets/exceptions.xml
- /*
- CatchArrayIndexOutOfBoundsException
- CatchError
- CatchException
- CatchIllegalMonitorStateException
- CatchIndexOutOfBoundsException
- CatchNullPointerException
- CatchRuntimeException
- CatchThrowable
- ConfusingClassNamedException
- ExceptionExtendsError
- ExceptionNotThrown
- MissingNewInThrowStatement
- ReturnNullFromCatchBlock
- SwallowThreadDeath
- ThrowError
- ThrowException
- ThrowNullPointerException
- ThrowRuntimeException
- ThrowThrowable
- */
- // rulesets/formatting.xml
- /*
- BracesForClass
- BracesForForLoop
- BracesForIfElse
- BracesForMethod
- BracesForTryCatchFinally
- ClassJavadoc
- ClosureStatementOnOpeningLineOfMultipleLineClosure
- LineLength
- SpaceAfterCatch
- SpaceAfterClosingBrace
- SpaceAfterComma
- SpaceAfterFor
- SpaceAfterIf
- SpaceAfterOpeningBrace
- SpaceAfterSemicolon
- SpaceAfterSwitch
- SpaceAfterWhile
- SpaceAroundClosureArrow
- SpaceAroundMapEntryColon
- SpaceAroundOperator
- SpaceBeforeClosingBrace
- SpaceBeforeOpeningBrace
- */
- // rulesets/generic.xml
- /*
- IllegalClassMember
- IllegalClassReference
- IllegalPackageReference
- IllegalRegex
- IllegalString
- RequiredRegex
- RequiredString
- StatelessClass
- */
- // rulesets/grails.xml
- /*
- GrailsDomainHasEquals
- GrailsDomainHasToString
- GrailsDomainReservedSqlKeywordName
- GrailsDomainWithServiceReference
- GrailsDuplicateConstraint
- GrailsDuplicateMapping
- GrailsPublicControllerMethod
- GrailsServletContextReference
- GrailsSessionReference // DEPRECATED
- GrailsStatelessService
- */
- // rulesets/groovyism.xml
- /*
- AssignCollectionSort
- AssignCollectionUnique
- ClosureAsLastMethodParameter
- CollectAllIsDeprecated
- ConfusingMultipleReturns
- ExplicitArrayListInstantiation
- ExplicitCallToAndMethod
- ExplicitCallToCompareToMethod
- ExplicitCallToDivMethod
- ExplicitCallToEqualsMethod
- ExplicitCallToGetAtMethod
- ExplicitCallToLeftShiftMethod
- ExplicitCallToMinusMethod
- ExplicitCallToModMethod
- ExplicitCallToMultiplyMethod
- ExplicitCallToOrMethod
- ExplicitCallToPlusMethod
- ExplicitCallToPowerMethod
- ExplicitCallToRightShiftMethod
- ExplicitCallToXorMethod
- ExplicitHashMapInstantiation
- ExplicitHashSetInstantiation
- ExplicitLinkedHashMapInstantiation
- ExplicitLinkedListInstantiation
- ExplicitStackInstantiation
- ExplicitTreeSetInstantiation
- GStringAsMapKey
- GStringExpressionWithinString
- GetterMethodCouldBeProperty
- GroovyLangImmutable
- UseCollectMany
- UseCollectNested
- */
- // rulesets/imports.xml
- DuplicateImport
- ImportFromSamePackage
- // ImportFromSunPackages
- // MisorderedStaticImports
- UnnecessaryGroovyImport
- UnusedImport
- // rulesets/jdbc.xml
- /*
- DirectConnectionManagement
- JdbcConnectionReference
- JdbcResultSetReference
- JdbcStatementReference
- */
- // rulesets/junit.xml
- /*
- ChainedTest
- CoupledTestCase
- JUnitAssertAlwaysFails
- JUnitAssertAlwaysSucceeds
- JUnitFailWithoutMessage
- JUnitLostTest
- JUnitPublicField
- JUnitPublicNonTestMethod
- JUnitSetUpCallsSuper
- JUnitStyleAssertions
- JUnitTearDownCallsSuper
- JUnitTestMethodWithoutAssert
- JUnitUnnecessarySetUp
- JUnitUnnecessaryTearDown
- JUnitUnnecessaryThrowsException
- SpockIgnoreRestUsed
- UnnecessaryFail
- UseAssertEqualsInsteadOfAssertTrue
- UseAssertFalseInsteadOfNegation
- UseAssertNullInsteadOfAssertEquals
- UseAssertSameInsteadOfAssertTrue
- UseAssertTrueInsteadOfAssertEquals
- UseAssertTrueInsteadOfNegation
- */
- // rulesets/logging.xml
- /*
- LoggerForDifferentClass
- LoggerWithWrongModifiers
- LoggingSwallowsStacktrace
- MultipleLoggers
- PrintStackTrace
- Println
- SystemErrPrint
- SystemOutPrint
- */
- // rulesets/naming.xml
- AbstractClassName
- ClassName {
- regex = '^[A-Z][\\$a-zA-Z0-9]*$'
- }
- ClassNameSameAsFilename
- // ConfusingMethodName
- // FactoryMethodName
- FieldName {
- regex = '^_?[a-z][a-zA-Z0-9]*$'
- finalRegex = '^_?[a-z][a-zA-Z0-9]*$'
- // can be either constant (ABC_XYZ) or non-constant (abcXyz)
- staticFinalRegex = '^[A-Z][A-Z_0-9]*$|^_?[a-z][a-zA-Z0-9]*$'
- }
- InterfaceName
- MethodName {
- regex = '^[a-z][\\$_a-zA-Z0-9]*$|^.*\\s.*$'
- }
- ObjectOverrideMisspelledMethodName
- ParameterName
- PropertyName
- VariableName {
- finalRegex = '^[a-z][a-zA-Z0-9]*$'
- }
- // rulesets/security.xml
- /*
- FileCreateTempFile
- InsecureRandom
- JavaIoPackageAccess
- NonFinalPublicField
- NonFinalSubclassOfSensitiveInterface
- ObjectFinalize
- PublicFinalizeMethod
- SystemExit
- UnsafeArrayDeclaration
- */
- // rulesets/serialization.xml
- /*
- EnumCustomSerializationIgnored
- SerialPersistentFields
- SerialVersionUID
- SerializableClassMustDefineSerialVersionUID
- */
- // rulesets/size.xml
- /*
- AbcComplexity // DEPRECATED: Use the AbcMetric rule instead. Requires the GMetrics jar
- AbcMetric // Requires the GMetrics jar
- ClassSize
- CrapMetric // Requires the GMetrics jar and a Cobertura coverage file
- CyclomaticComplexity // Requires the GMetrics jar
- MethodCount
- MethodSize
- NestedBlockDepth
- */
- // rulesets/unnecessary.xml
- AddEmptyString
- ConsecutiveLiteralAppends
- ConsecutiveStringConcatenation
- UnnecessaryBigDecimalInstantiation
- UnnecessaryBigIntegerInstantiation
- UnnecessaryBooleanExpression
- UnnecessaryBooleanInstantiation
- // UnnecessaryCallForLastElement
- UnnecessaryCallToSubstring
- UnnecessaryCatchBlock
- // UnnecessaryCollectCall
- UnnecessaryCollectionCall
- UnnecessaryConstructor
- UnnecessaryDefInFieldDeclaration
- UnnecessaryDefInMethodDeclaration
- UnnecessaryDefInVariableDeclaration
- UnnecessaryDotClass
- UnnecessaryDoubleInstantiation
- UnnecessaryElseStatement
- UnnecessaryFinalOnPrivateMethod
- UnnecessaryFloatInstantiation
- // UnnecessaryGString
- // UnnecessaryGetter
- UnnecessaryIfStatement
- UnnecessaryInstanceOfCheck
- UnnecessaryInstantiationToGetClass
- UnnecessaryIntegerInstantiation
- UnnecessaryLongInstantiation
- UnnecessaryModOne
- UnnecessaryNullCheck
- UnnecessaryNullCheckBeforeInstanceOf
- // UnnecessaryObjectReferences
- UnnecessaryOverridingMethod
- // UnnecessaryPackageReference
- UnnecessaryParenthesesForMethodCallWithClosure
- UnnecessaryPublicModifier
- // UnnecessaryReturnKeyword
- // UnnecessarySelfAssignment
- UnnecessarySemicolon
- UnnecessaryStringInstantiation
- // UnnecessarySubstring
- UnnecessaryTernaryExpression
- UnnecessaryTransientModifier
- // rulesets/unused.xml
- UnusedArray
- // UnusedMethodParameter
- UnusedObject
- UnusedPrivateField
- UnusedPrivateMethod
- UnusedPrivateMethodParameter
- UnusedVariable
- }
|