├── .github
└── workflows
│ ├── beta_release.yml
│ ├── codenarc_releases_watcher.yml
│ ├── gradle.yml
│ └── release.yml
├── .gitignore
├── README.md
├── build.gradle
├── changelog.html
├── description.html
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── settings.gradle
├── src
├── generator
│ └── groovy
│ │ └── org
│ │ └── codenarc
│ │ └── idea
│ │ └── gen
│ │ └── RuleInspectionsGenerator.groovy
├── main
│ ├── java
│ │ └── org
│ │ │ └── codenarc
│ │ │ └── idea
│ │ │ ├── CodeNarcBundle.java
│ │ │ ├── CodeNarcInspectionTool.java
│ │ │ ├── error
│ │ │ └── SentryErrorSubmitter.java
│ │ │ ├── inspections
│ │ │ ├── basic
│ │ │ │ ├── AssertWithinFinallyBlockInspectionTool.java
│ │ │ │ ├── AssignmentInConditionalInspectionTool.java
│ │ │ │ ├── BigDecimalInstantiationInspectionTool.java
│ │ │ │ ├── BitwiseOperatorInConditionalInspectionTool.java
│ │ │ │ ├── BooleanGetBooleanInspectionTool.java
│ │ │ │ ├── BrokenNullCheckInspectionTool.java
│ │ │ │ ├── BrokenOddnessCheckInspectionTool.java
│ │ │ │ ├── ClassForNameInspectionTool.java
│ │ │ │ ├── ComparisonOfTwoConstantsInspectionTool.java
│ │ │ │ ├── ComparisonWithSelfInspectionTool.java
│ │ │ │ ├── ConstantAssertExpressionInspectionTool.java
│ │ │ │ ├── ConstantIfExpressionInspectionTool.java
│ │ │ │ ├── ConstantTernaryExpressionInspectionTool.java
│ │ │ │ ├── DeadCodeInspectionTool.java
│ │ │ │ ├── DoubleNegativeInspectionTool.java
│ │ │ │ ├── DuplicateCaseStatementInspectionTool.java
│ │ │ │ ├── DuplicateMapKeyInspectionTool.java
│ │ │ │ ├── DuplicateSetValueInspectionTool.java
│ │ │ │ ├── EmptyCatchBlockInspectionTool.java
│ │ │ │ ├── EmptyClassInspectionTool.java
│ │ │ │ ├── EmptyElseBlockInspectionTool.java
│ │ │ │ ├── EmptyFinallyBlockInspectionTool.java
│ │ │ │ ├── EmptyForStatementInspectionTool.java
│ │ │ │ ├── EmptyIfStatementInspectionTool.java
│ │ │ │ ├── EmptyInstanceInitializerInspectionTool.java
│ │ │ │ ├── EmptyMethodInspectionTool.java
│ │ │ │ ├── EmptyStaticInitializerInspectionTool.java
│ │ │ │ ├── EmptySwitchStatementInspectionTool.java
│ │ │ │ ├── EmptySynchronizedStatementInspectionTool.java
│ │ │ │ ├── EmptyTryBlockInspectionTool.java
│ │ │ │ ├── EmptyWhileStatementInspectionTool.java
│ │ │ │ ├── EqualsAndHashCodeInspectionTool.java
│ │ │ │ ├── EqualsOverloadedInspectionTool.java
│ │ │ │ ├── ExplicitGarbageCollectionInspectionTool.java
│ │ │ │ ├── ForLoopShouldBeWhileLoopInspectionTool.java
│ │ │ │ ├── HardCodedWindowsFileSeparatorInspectionTool.java
│ │ │ │ ├── HardCodedWindowsRootDirectoryInspectionTool.java
│ │ │ │ ├── IntegerGetIntegerInspectionTool.java
│ │ │ │ ├── MultipleUnaryOperatorsInspectionTool.java
│ │ │ │ ├── ParameterAssignmentInFilterClosureInspectionTool.java
│ │ │ │ ├── RandomDoubleCoercedToZeroInspectionTool.java
│ │ │ │ ├── RemoveAllOnSelfInspectionTool.java
│ │ │ │ ├── ReturnFromFinallyBlockInspectionTool.java
│ │ │ │ └── ThrowExceptionFromFinallyBlockInspectionTool.java
│ │ │ ├── braces
│ │ │ │ ├── ElseBlockBracesInspectionTool.java
│ │ │ │ ├── ForStatementBracesInspectionTool.java
│ │ │ │ ├── IfStatementBracesInspectionTool.java
│ │ │ │ └── WhileStatementBracesInspectionTool.java
│ │ │ ├── comments
│ │ │ │ ├── ClassJavadocInspectionTool.java
│ │ │ │ ├── JavadocConsecutiveEmptyLinesInspectionTool.java
│ │ │ │ ├── JavadocEmptyAuthorTagInspectionTool.java
│ │ │ │ ├── JavadocEmptyExceptionTagInspectionTool.java
│ │ │ │ ├── JavadocEmptyFirstLineInspectionTool.java
│ │ │ │ ├── JavadocEmptyLastLineInspectionTool.java
│ │ │ │ ├── JavadocEmptyParamTagInspectionTool.java
│ │ │ │ ├── JavadocEmptyReturnTagInspectionTool.java
│ │ │ │ ├── JavadocEmptySeeTagInspectionTool.java
│ │ │ │ ├── JavadocEmptySinceTagInspectionTool.java
│ │ │ │ ├── JavadocEmptyThrowsTagInspectionTool.java
│ │ │ │ ├── JavadocEmptyVersionTagInspectionTool.java
│ │ │ │ ├── JavadocMissingExceptionDescriptionInspectionTool.java
│ │ │ │ ├── JavadocMissingParamDescriptionInspectionTool.java
│ │ │ │ └── JavadocMissingThrowsDescriptionInspectionTool.java
│ │ │ ├── concurrency
│ │ │ │ ├── BusyWaitInspectionTool.java
│ │ │ │ ├── DoubleCheckedLockingInspectionTool.java
│ │ │ │ ├── InconsistentPropertyLockingInspectionTool.java
│ │ │ │ ├── InconsistentPropertySynchronizationInspectionTool.java
│ │ │ │ ├── NestedSynchronizationInspectionTool.java
│ │ │ │ ├── StaticCalendarFieldInspectionTool.java
│ │ │ │ ├── StaticConnectionInspectionTool.java
│ │ │ │ ├── StaticDateFormatFieldInspectionTool.java
│ │ │ │ ├── StaticMatcherFieldInspectionTool.java
│ │ │ │ ├── StaticSimpleDateFormatFieldInspectionTool.java
│ │ │ │ ├── SynchronizedMethodInspectionTool.java
│ │ │ │ ├── SynchronizedOnBoxedPrimitiveInspectionTool.java
│ │ │ │ ├── SynchronizedOnGetClassInspectionTool.java
│ │ │ │ ├── SynchronizedOnReentrantLockInspectionTool.java
│ │ │ │ ├── SynchronizedOnStringInspectionTool.java
│ │ │ │ ├── SynchronizedOnThisInspectionTool.java
│ │ │ │ ├── SynchronizedReadObjectMethodInspectionTool.java
│ │ │ │ ├── SystemRunFinalizersOnExitInspectionTool.java
│ │ │ │ ├── ThisReferenceEscapesConstructorInspectionTool.java
│ │ │ │ ├── ThreadGroupInspectionTool.java
│ │ │ │ ├── ThreadLocalNotStaticFinalInspectionTool.java
│ │ │ │ ├── ThreadYieldInspectionTool.java
│ │ │ │ ├── UseOfNotifyMethodInspectionTool.java
│ │ │ │ ├── VolatileArrayFieldInspectionTool.java
│ │ │ │ ├── VolatileLongOrDoubleFieldInspectionTool.java
│ │ │ │ └── WaitOutsideOfWhileLoopInspectionTool.java
│ │ │ ├── convention
│ │ │ │ ├── CompileStaticInspectionTool.java
│ │ │ │ ├── ConfusingTernaryInspectionTool.java
│ │ │ │ ├── CouldBeElvisInspectionTool.java
│ │ │ │ ├── CouldBeSwitchStatementInspectionTool.java
│ │ │ │ ├── FieldTypeRequiredInspectionTool.java
│ │ │ │ ├── HashtableIsObsoleteInspectionTool.java
│ │ │ │ ├── IfStatementCouldBeTernaryInspectionTool.java
│ │ │ │ ├── ImplicitClosureParameterInspectionTool.java
│ │ │ │ ├── ImplicitReturnStatementInspectionTool.java
│ │ │ │ ├── InvertedConditionInspectionTool.java
│ │ │ │ ├── InvertedIfElseInspectionTool.java
│ │ │ │ ├── LongLiteralWithLowerCaseLInspectionTool.java
│ │ │ │ ├── MethodParameterTypeRequInspectionTool.java
│ │ │ │ ├── MethodReturnTypeRequiredInspectionTool.java
│ │ │ │ ├── NoDefInspectionTool.java
│ │ │ │ ├── NoDoubleInspectionTool.java
│ │ │ │ ├── NoFloatInspectionTool.java
│ │ │ │ ├── NoJavaUtilDateInspectionTool.java
│ │ │ │ ├── NoTabCharacterInspectionTool.java
│ │ │ │ ├── ParameterReassignmentInspectionTool.java
│ │ │ │ ├── PublicMethodsBeforeNonPublicMethodsInspectionTool.java
│ │ │ │ ├── StaticFieldsBeforeInstanceFieldsInspectionTool.java
│ │ │ │ ├── StaticMethodsBeforeInstanceMethodsInspectionTool.java
│ │ │ │ ├── TernaryCouldBeElvisInspectionTool.java
│ │ │ │ ├── TrailingCommaInspectionTool.java
│ │ │ │ ├── VariableTypeRequiredInspectionTool.java
│ │ │ │ └── VectorIsObsoleteInspectionTool.java
│ │ │ ├── design
│ │ │ │ ├── AbstractClassWithPublicConstructorInspectionTool.java
│ │ │ │ ├── AbstractClassWithoutAbstractMethodInspectionTool.java
│ │ │ │ ├── AssignmentToStaticFieldFromInstanceMethodInspectionTool.java
│ │ │ │ ├── BooleanMethodReturnsNullInspectionTool.java
│ │ │ │ ├── BuilderMethodWithSideEffectsInspectionTool.java
│ │ │ │ ├── CloneableWithoutCloneInspectionTool.java
│ │ │ │ ├── CloseWithoutCloseableInspectionTool.java
│ │ │ │ ├── CompareToWithoutComparableInspectionTool.java
│ │ │ │ ├── ConstantsOnlyInterfaceInspectionTool.java
│ │ │ │ ├── EmptyMethodInAbstractClassInspectionTool.java
│ │ │ │ ├── FinalClassWithProtectedMemberInspectionTool.java
│ │ │ │ ├── ImplementationAsTypeInspectionTool.java
│ │ │ │ ├── InstanceofInspectionTool.java
│ │ │ │ ├── LocaleSetDefaultInspectionTool.java
│ │ │ │ ├── NestedForLoopInspectionTool.java
│ │ │ │ ├── OptionalCollectionReturnTypeInspectionTool.java
│ │ │ │ ├── OptionalFieldInspectionTool.java
│ │ │ │ ├── OptionalMethodParameterInspectionTool.java
│ │ │ │ ├── PrivateFieldCouldBeFinalInspectionTool.java
│ │ │ │ ├── PublicInstanceFieldInspectionTool.java
│ │ │ │ ├── ReturnsNullInsteadOfEmptyArrayInspectionTool.java
│ │ │ │ ├── ReturnsNullInsteadOfEmptyCollectionInspectionTool.java
│ │ │ │ ├── SimpleDateFormatMissingLocaleInspectionTool.java
│ │ │ │ ├── StatelessSingletonInspectionTool.java
│ │ │ │ └── ToStringReturnsNullInspectionTool.java
│ │ │ ├── dry
│ │ │ │ ├── DuplicateListLiteralInspectionTool.java
│ │ │ │ ├── DuplicateMapLiteralInspectionTool.java
│ │ │ │ ├── DuplicateNumberLiteralInspectionTool.java
│ │ │ │ └── DuplicateStringLiteralInspectionTool.java
│ │ │ ├── exceptions
│ │ │ │ ├── CatchArrayIndexOutOfBoundsExceptionInspectionTool.java
│ │ │ │ ├── CatchErrorInspectionTool.java
│ │ │ │ ├── CatchExceptionInspectionTool.java
│ │ │ │ ├── CatchIllegalMonitorStateExceptionInspectionTool.java
│ │ │ │ ├── CatchIndexOutOfBoundsExceptionInspectionTool.java
│ │ │ │ ├── CatchNullPointerExceptionInspectionTool.java
│ │ │ │ ├── CatchRuntimeExceptionInspectionTool.java
│ │ │ │ ├── CatchThrowableInspectionTool.java
│ │ │ │ ├── ConfusingClassNamedExceptionInspectionTool.java
│ │ │ │ ├── ExceptionExtendsErrorInspectionTool.java
│ │ │ │ ├── ExceptionExtendsThrowableInspectionTool.java
│ │ │ │ ├── ExceptionNotThrownInspectionTool.java
│ │ │ │ ├── MissingNewInThrowStatementInspectionTool.java
│ │ │ │ ├── ReturnNullFromCatchBlockInspectionTool.java
│ │ │ │ ├── SwallowThreadDeathInspectionTool.java
│ │ │ │ ├── ThrowErrorInspectionTool.java
│ │ │ │ ├── ThrowExceptionInspectionTool.java
│ │ │ │ ├── ThrowNullPointerExceptionInspectionTool.java
│ │ │ │ ├── ThrowRuntimeExceptionInspectionTool.java
│ │ │ │ └── ThrowThrowableInspectionTool.java
│ │ │ ├── formatting
│ │ │ │ ├── BlankLineBeforePackageInspectionTool.java
│ │ │ │ ├── BlockEndsWithBlankLineInspectionTool.java
│ │ │ │ ├── BlockStartsWithBlankLineInspectionTool.java
│ │ │ │ ├── BracesForClassInspectionTool.java
│ │ │ │ ├── BracesForForLoopInspectionTool.java
│ │ │ │ ├── BracesForIfElseInspectionTool.java
│ │ │ │ ├── BracesForMethodInspectionTool.java
│ │ │ │ ├── BracesForTryCatchFinallyInspectionTool.java
│ │ │ │ ├── ClassEndsWithBlankLineInspectionTool.java
│ │ │ │ ├── ClassStartsWithBlankLineInspectionTool.java
│ │ │ │ ├── ClosureStatementOnOpeningLineOfMultipleLineClosureInspectionTool.java
│ │ │ │ ├── ConsecutiveBlankLinesInspectionTool.java
│ │ │ │ ├── FileEndsWithoutNewlineInspectionTool.java
│ │ │ │ ├── IndentationInspectionTool.java
│ │ │ │ ├── LineLengthInspectionTool.java
│ │ │ │ ├── MissingBlankLineAfterImportsInspectionTool.java
│ │ │ │ ├── MissingBlankLineAfterPackageInspectionTool.java
│ │ │ │ ├── MissingBlankLineBeforeAnnotatedFieldInspectionTool.java
│ │ │ │ ├── SpaceAfterCatchInspectionTool.java
│ │ │ │ ├── SpaceAfterClosingBraceInspectionTool.java
│ │ │ │ ├── SpaceAfterCommaInspectionTool.java
│ │ │ │ ├── SpaceAfterForInspectionTool.java
│ │ │ │ ├── SpaceAfterIfInspectionTool.java
│ │ │ │ ├── SpaceAfterMethodCallNameInspectionTool.java
│ │ │ │ ├── SpaceAfterMethodDeclarationNameInspectionTool.java
│ │ │ │ ├── SpaceAfterNotOperatorInspectionTool.java
│ │ │ │ ├── SpaceAfterOpeningBraceInspectionTool.java
│ │ │ │ ├── SpaceAfterSemicolonInspectionTool.java
│ │ │ │ ├── SpaceAfterSwitchInspectionTool.java
│ │ │ │ ├── SpaceAfterWhileInspectionTool.java
│ │ │ │ ├── SpaceAroundClosureArrowInspectionTool.java
│ │ │ │ ├── SpaceAroundMapEntryColonInspectionTool.java
│ │ │ │ ├── SpaceAroundOperatorInspectionTool.java
│ │ │ │ ├── SpaceBeforeClosingBraceInspectionTool.java
│ │ │ │ ├── SpaceBeforeOpeningBraceInspectionTool.java
│ │ │ │ ├── SpaceInsideParenthesesInspectionTool.java
│ │ │ │ └── TrailingWhitespaceInspectionTool.java
│ │ │ ├── generic
│ │ │ │ ├── IllegalClassMemberInspectionTool.java
│ │ │ │ ├── IllegalClassReferenceInspectionTool.java
│ │ │ │ ├── IllegalPackageReferenceInspectionTool.java
│ │ │ │ ├── IllegalRegexInspectionTool.java
│ │ │ │ ├── IllegalStringInspectionTool.java
│ │ │ │ ├── IllegalSubclassInspectionTool.java
│ │ │ │ ├── RequiredRegexInspectionTool.java
│ │ │ │ ├── RequiredStringInspectionTool.java
│ │ │ │ └── StatelessClassInspectionTool.java
│ │ │ ├── grails
│ │ │ │ ├── GrailsDomainHasEqualsInspectionTool.java
│ │ │ │ ├── GrailsDomainHasToStringInspectionTool.java
│ │ │ │ ├── GrailsDomainReservedSqlKeywordNameInspectionTool.java
│ │ │ │ ├── GrailsDomainStringPropertyMaxSizeInspectionTool.java
│ │ │ │ ├── GrailsDomainWithServiceReferenceInspectionTool.java
│ │ │ │ ├── GrailsDuplicateConstraintInspectionTool.java
│ │ │ │ ├── GrailsDuplicateMappingInspectionTool.java
│ │ │ │ ├── GrailsMassAssignmentInspectionTool.java
│ │ │ │ ├── GrailsPublicControllerMethodInspectionTool.java
│ │ │ │ ├── GrailsServletContextReferenceInspectionTool.java
│ │ │ │ └── GrailsStatelessServiceInspectionTool.java
│ │ │ ├── groovyism
│ │ │ │ ├── AssignCollectionSortInspectionTool.java
│ │ │ │ ├── AssignCollectionUniqueInspectionTool.java
│ │ │ │ ├── ClosureAsLastMethodParameterInspectionTool.java
│ │ │ │ ├── CollectAllIsDeprecatedInspectionTool.java
│ │ │ │ ├── ConfusingMultipleReturnsInspectionTool.java
│ │ │ │ ├── ExplicitArrayListInstantiationInspectionTool.java
│ │ │ │ ├── ExplicitCallToAndMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToCompareToMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToDivMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToEqualsMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToGetAtMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToLeftShiftMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToMinusMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToModMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToMultiplyMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToOrMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToPlusMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToPowerMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToPutAtMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToRightShiftMethodInspectionTool.java
│ │ │ │ ├── ExplicitCallToXorMethodInspectionTool.java
│ │ │ │ ├── ExplicitHashMapInstantiationInspectionTool.java
│ │ │ │ ├── ExplicitHashSetInstantiationInspectionTool.java
│ │ │ │ ├── ExplicitLinkedHashMapInstantiationInspectionTool.java
│ │ │ │ ├── ExplicitLinkedListInstantiationInspectionTool.java
│ │ │ │ ├── ExplicitStackInstantiationInspectionTool.java
│ │ │ │ ├── ExplicitTreeSetInstantiationInspectionTool.java
│ │ │ │ ├── GStringAsMapKeyInspectionTool.java
│ │ │ │ ├── GStringExpressionWithinStringInspectionTool.java
│ │ │ │ ├── GetterMethodCouldBePropertyInspectionTool.java
│ │ │ │ ├── GroovyLangImmutableInspectionTool.java
│ │ │ │ ├── UseCollectManyInspectionTool.java
│ │ │ │ └── UseCollectNestedInspectionTool.java
│ │ │ ├── imports
│ │ │ │ ├── DuplicateImportInspectionTool.java
│ │ │ │ ├── ImportFromSamePackageInspectionTool.java
│ │ │ │ ├── ImportFromSunPackagesInspectionTool.java
│ │ │ │ ├── MisorderedStaticImportsInspectionTool.java
│ │ │ │ ├── NoWildcardImportsInspectionTool.java
│ │ │ │ ├── UnnecessaryGroovyImportInspectionTool.java
│ │ │ │ └── UnusedImportInspectionTool.java
│ │ │ ├── jdbc
│ │ │ │ ├── DirectConnectionManagementInspectionTool.java
│ │ │ │ ├── JdbcConnectionReferenceInspectionTool.java
│ │ │ │ ├── JdbcResultSetReferenceInspectionTool.java
│ │ │ │ └── JdbcStatementReferenceInspectionTool.java
│ │ │ ├── junit
│ │ │ │ ├── ChainedTestInspectionTool.java
│ │ │ │ ├── CoupledTestCaseInspectionTool.java
│ │ │ │ ├── JUnitAssertAlwaysFailsInspectionTool.java
│ │ │ │ ├── JUnitAssertAlwaysSucceedsInspectionTool.java
│ │ │ │ ├── JUnitFailWithoutMessageInspectionTool.java
│ │ │ │ ├── JUnitLostTestInspectionTool.java
│ │ │ │ ├── JUnitPublicFieldInspectionTool.java
│ │ │ │ ├── JUnitPublicNonTestMethodInspectionTool.java
│ │ │ │ ├── JUnitPublicPropertyInspectionTool.java
│ │ │ │ ├── JUnitSetUpCallsSuperInspectionTool.java
│ │ │ │ ├── JUnitStyleAssertionsInspectionTool.java
│ │ │ │ ├── JUnitTearDownCallsSuperInspectionTool.java
│ │ │ │ ├── JUnitTestMethodWithoutAssertInspectionTool.java
│ │ │ │ ├── JUnitUnnecessarySetUpInspectionTool.java
│ │ │ │ ├── JUnitUnnecessaryTearDownInspectionTool.java
│ │ │ │ ├── JUnitUnnecessaryThrowsExceptionInspectionTool.java
│ │ │ │ ├── SpockIgnoreRestUsedInspectionTool.java
│ │ │ │ ├── UnnecessaryFailInspectionTool.java
│ │ │ │ ├── UseAssertEqualsInsteadOfAssertTrueInspectionTool.java
│ │ │ │ ├── UseAssertFalseInsteadOfNegationInspectionTool.java
│ │ │ │ ├── UseAssertNullInsteadOfAssertEqualsInspectionTool.java
│ │ │ │ ├── UseAssertSameInsteadOfAssertTrueInspectionTool.java
│ │ │ │ ├── UseAssertTrueInsteadOfAssertEqualsInspectionTool.java
│ │ │ │ └── UseAssertTrueInsteadOfNegationInspectionTool.java
│ │ │ ├── logging
│ │ │ │ ├── LoggerForDifferentClassInspectionTool.java
│ │ │ │ ├── LoggerWithWrongModifiersInspectionTool.java
│ │ │ │ ├── LoggingSwallowsStacktraceInspectionTool.java
│ │ │ │ ├── MultipleLoggersInspectionTool.java
│ │ │ │ ├── PrintStackTraceInspectionTool.java
│ │ │ │ ├── PrintlnInspectionTool.java
│ │ │ │ ├── SystemErrPrintInspectionTool.java
│ │ │ │ └── SystemOutPrintInspectionTool.java
│ │ │ ├── naming
│ │ │ │ ├── AbstractClassNameInspectionTool.java
│ │ │ │ ├── ClassNameInspectionTool.java
│ │ │ │ ├── ClassNameSameAsFilenameInspectionTool.java
│ │ │ │ ├── ClassNameSameAsSuperclassInspectionTool.java
│ │ │ │ ├── ConfusingMethodNameInspectionTool.java
│ │ │ │ ├── FactoryMethodNameInspectionTool.java
│ │ │ │ ├── FieldNameInspectionTool.java
│ │ │ │ ├── InterfaceNameInspectionTool.java
│ │ │ │ ├── InterfaceNameSameAsSuperInterfaceInspectionTool.java
│ │ │ │ ├── MethodNameInspectionTool.java
│ │ │ │ ├── ObjectOverrideMisspelledMethodNameInspectionTool.java
│ │ │ │ ├── PackageNameInspectionTool.java
│ │ │ │ ├── PackageNameMatchesFilePathInspectionTool.java
│ │ │ │ ├── ParameterNameInspectionTool.java
│ │ │ │ ├── PropertyNameInspectionTool.java
│ │ │ │ └── VariableNameInspectionTool.java
│ │ │ ├── security
│ │ │ │ ├── FileCreateTempFileInspectionTool.java
│ │ │ │ ├── InsecureRandomInspectionTool.java
│ │ │ │ ├── JavaIoPackageAccessInspectionTool.java
│ │ │ │ ├── NonFinalPublicFieldInspectionTool.java
│ │ │ │ ├── NonFinalSubclassOfSensitiveInterfaceInspectionTool.java
│ │ │ │ ├── ObjectFinalizeInspectionTool.java
│ │ │ │ ├── PublicFinalizeMethodInspectionTool.java
│ │ │ │ ├── SystemExitInspectionTool.java
│ │ │ │ └── UnsafeArrayDeclarationInspectionTool.java
│ │ │ ├── serialization
│ │ │ │ ├── EnumCustomSerializationIgnoredInspectionTool.java
│ │ │ │ ├── SerialPersistentFieldsInspectionTool.java
│ │ │ │ ├── SerialVersionUIDInspectionTool.java
│ │ │ │ └── SerializableClassMustDefineSerialVersionUIDInspectionTool.java
│ │ │ ├── size
│ │ │ │ ├── AbcMetricInspectionTool.java
│ │ │ │ ├── ClassSizeInspectionTool.java
│ │ │ │ ├── CrapMetricInspectionTool.java
│ │ │ │ ├── CyclomaticComplexityInspectionTool.java
│ │ │ │ ├── MethodCountInspectionTool.java
│ │ │ │ ├── MethodSizeInspectionTool.java
│ │ │ │ ├── NestedBlockDepthInspectionTool.java
│ │ │ │ └── ParameterCountInspectionTool.java
│ │ │ ├── unnecessary
│ │ │ │ ├── AddEmptyStringInspectionTool.java
│ │ │ │ ├── ConsecutiveLiteralAppendsInspectionTool.java
│ │ │ │ ├── ConsecutiveStringConcatenationInspectionTool.java
│ │ │ │ ├── UnnecessaryBigDecimalInstantiationInspectionTool.java
│ │ │ │ ├── UnnecessaryBigIntegerInstantiationInspectionTool.java
│ │ │ │ ├── UnnecessaryBooleanExpressionInspectionTool.java
│ │ │ │ ├── UnnecessaryBooleanInstantiationInspectionTool.java
│ │ │ │ ├── UnnecessaryCallForLastElementInspectionTool.java
│ │ │ │ ├── UnnecessaryCallToSubstringInspectionTool.java
│ │ │ │ ├── UnnecessaryCastInspectionTool.java
│ │ │ │ ├── UnnecessaryCatchBlockInspectionTool.java
│ │ │ │ ├── UnnecessaryCollectCallInspectionTool.java
│ │ │ │ ├── UnnecessaryCollectionCallInspectionTool.java
│ │ │ │ ├── UnnecessaryConstructorInspectionTool.java
│ │ │ │ ├── UnnecessaryDefInFieldDeclarationInspectionTool.java
│ │ │ │ ├── UnnecessaryDefInMethodDeclarationInspectionTool.java
│ │ │ │ ├── UnnecessaryDefInVariableDeclarationInspectionTool.java
│ │ │ │ ├── UnnecessaryDotClassInspectionTool.java
│ │ │ │ ├── UnnecessaryDoubleInstantiationInspectionTool.java
│ │ │ │ ├── UnnecessaryElseStatementInspectionTool.java
│ │ │ │ ├── UnnecessaryFinalOnPrivateMethodInspectionTool.java
│ │ │ │ ├── UnnecessaryFloatInstantiationInspectionTool.java
│ │ │ │ ├── UnnecessaryGStringInspectionTool.java
│ │ │ │ ├── UnnecessaryGetterInspectionTool.java
│ │ │ │ ├── UnnecessaryIfStatementInspectionTool.java
│ │ │ │ ├── UnnecessaryInstanceOfCheckInspectionTool.java
│ │ │ │ ├── UnnecessaryInstantiationToGetClassInspectionTool.java
│ │ │ │ ├── UnnecessaryIntegerInstantiationInspectionTool.java
│ │ │ │ ├── UnnecessaryLongInstantiationInspectionTool.java
│ │ │ │ ├── UnnecessaryModOneInspectionTool.java
│ │ │ │ ├── UnnecessaryNullCheckBeforeInstanceOfInspectionTool.java
│ │ │ │ ├── UnnecessaryNullCheckInspectionTool.java
│ │ │ │ ├── UnnecessaryObjectReferencesInspectionTool.java
│ │ │ │ ├── UnnecessaryOverridingMethodInspectionTool.java
│ │ │ │ ├── UnnecessaryPackageReferenceInspectionTool.java
│ │ │ │ ├── UnnecessaryParenthesesForMethodCallWithClosureInspectionTool.java
│ │ │ │ ├── UnnecessaryPublicModifierInspectionTool.java
│ │ │ │ ├── UnnecessaryReturnKeywordInspectionTool.java
│ │ │ │ ├── UnnecessarySafeNavigationOperatorInspectionTool.java
│ │ │ │ ├── UnnecessarySelfAssignmentInspectionTool.java
│ │ │ │ ├── UnnecessarySemicolonInspectionTool.java
│ │ │ │ ├── UnnecessarySetterInspectionTool.java
│ │ │ │ ├── UnnecessaryStringInstantiationInspectionTool.java
│ │ │ │ ├── UnnecessaryTernaryExpressionInspectionTool.java
│ │ │ │ ├── UnnecessaryToStringInspectionTool.java
│ │ │ │ └── UnnecessaryTransientModifierInspectionTool.java
│ │ │ └── unused
│ │ │ │ ├── UnusedArrayInspectionTool.java
│ │ │ │ ├── UnusedMethodParameterInspectionTool.java
│ │ │ │ ├── UnusedObjectInspectionTool.java
│ │ │ │ ├── UnusedPrivateFieldInspectionTool.java
│ │ │ │ ├── UnusedPrivateMethodInspectionTool.java
│ │ │ │ ├── UnusedPrivateMethodParameterInspectionTool.java
│ │ │ │ └── UnusedVariableInspectionTool.java
│ │ │ ├── quickfix
│ │ │ ├── AddExplicitReturnQuickFix.java
│ │ │ ├── ConvertGStringToStringReusableIntention.java
│ │ │ ├── IntentionQuickFix.java
│ │ │ ├── RemoveRedundantClassPropertyReusableIntention.java
│ │ │ ├── RemoveUnnecessaryReturnReusableIntention.java
│ │ │ ├── ReplaceOnDemandImportFix.java
│ │ │ ├── ReplacePrintlnWithAnnotationFix.java
│ │ │ ├── ReplaceStatementFix.java
│ │ │ └── ReusableIntention.java
│ │ │ └── ui
│ │ │ ├── Helpers.java
│ │ │ ├── SingleCheckboxOptionsPanel.java
│ │ │ ├── SingleIntegerFieldOptionsPanel.java
│ │ │ └── SingleTextFieldOptionsPanel.java
│ └── resources
│ │ ├── META-INF
│ │ └── plugin.xml
│ │ └── messages
│ │ └── CodeNarcBundle.properties
└── test
│ ├── groovy
│ └── org
│ │ └── codenarc
│ │ └── idea
│ │ ├── inspections
│ │ ├── basic
│ │ │ └── AssignmentInConditionalInspectionToolSpec.groovy
│ │ ├── convention
│ │ │ └── ImplicitReturnStatementInspectionToolSpec.groovy
│ │ ├── groovyism
│ │ │ ├── AssignCollectionSortInspectionToolSpec.groovy
│ │ │ └── AssignCollectionUniqueInspectionToolSpec.groovy
│ │ ├── imports
│ │ │ ├── NoWildcardImportsInspectionToolSpec.groovy
│ │ │ └── UnusedImportInspectionToolSpec.groovy
│ │ ├── logging
│ │ │ └── PrintlnInspectionToolSpec.groovy
│ │ └── unnecessary
│ │ │ ├── UnnecessaryDotClassInspectionToolSpec.groovy
│ │ │ └── UnnecessaryGStringInspectionToolSpec.groovy
│ │ └── testing
│ │ ├── CompoundTestLibrary.java
│ │ ├── FixtureHelper.groovy
│ │ ├── GroovyProjectDescriptors.java
│ │ ├── InspectionSpec.groovy
│ │ ├── LibraryLightProjectDescriptor.java
│ │ ├── RepositoryTestLibrary.java
│ │ ├── TestLibrary.java
│ │ └── package-info.java
│ └── resources
│ └── org
│ └── codenarc
│ └── idea
│ └── inspections
│ ├── basic
│ └── AssignmentInConditionalInspectionToolSpec
│ │ ├── before.txt
│ │ └── fixed.txt
│ ├── convention
│ └── ImplicitReturnStatementInspectionToolSpec
│ │ ├── before.txt
│ │ └── fixed.txt
│ ├── groovyism
│ ├── AssignCollectionSortInspectionToolSpec
│ │ ├── before.txt
│ │ └── fixed.txt
│ └── AssignCollectionUniqueInspectionToolSpec
│ │ ├── before.txt
│ │ └── fixed.txt
│ ├── imports
│ ├── NoWildcardImportsInspectionToolSpec
│ │ ├── before.txt
│ │ └── fixed.txt
│ └── UnusedImportInspectionToolSpec
│ │ ├── before.txt
│ │ └── fixed.txt
│ ├── logging
│ └── PrintlnInspectionToolSpec
│ │ ├── before.txt
│ │ └── fixed.txt
│ └── unnecessary
│ ├── UnnecessaryDotClassInspectionToolSpec
│ ├── before.txt
│ └── fixed.txt
│ └── UnnecessaryGStringInspectionToolSpec
│ ├── before.txt
│ └── fixed.txt
└── static
└── images
├── add-repository-1.png
└── add-repository-2.png
/.github/workflows/beta_release.yml:
--------------------------------------------------------------------------------
1 | name: Release to Beta Channel
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 | jobs:
8 | release:
9 | name: Release
10 | runs-on: ubuntu-latest
11 | env:
12 | GRADLE_OPTS: "-Xmx6g -Xms4g"
13 | steps:
14 | - name: Set current date as env variable
15 | run: echo "SNAPSHOT_SUFFIX=$(date +'%Y%m%d%H%M')" >> $GITHUB_ENV
16 | - uses: actions/checkout@v1
17 | - name: Set up JDK 17
18 | uses: actions/setup-java@v3
19 | with:
20 | java-version: 17
21 | distribution: zulu
22 | - uses: gradle/gradle-build-action@v2
23 | with:
24 | arguments: publishPlugin -PpublishPluginChannels=beta -PpublishPluginToken=${{ secrets.JB_PLUGINS_TOKEN }} -PideVersion=IC-2023.2 -PpluginVersion=6.2.0-${{ env.SNAPSHOT_SUFFIX }}
25 |
--------------------------------------------------------------------------------
/.github/workflows/gradle.yml:
--------------------------------------------------------------------------------
1 | name: Check
2 |
3 | on: [push, pull_request]
4 | jobs:
5 | check:
6 | name: Run Tests
7 | runs-on: ubuntu-latest
8 | env:
9 | GRADLE_OPTS: "-Xmx6g -Xms4g"
10 | CI: true
11 | strategy:
12 | fail-fast: false # we need to know which version is failing
13 | matrix:
14 | version:
15 | - "-PideVersion=IC-2022.3"
16 | - "-PideVersion=IC-2023.2"
17 | steps:
18 | - uses: actions/checkout@v1
19 |
20 | - name: Set up JDK 17
21 | uses: actions/setup-java@v3
22 | with:
23 | java-version: 17
24 | distribution: zulu
25 | - uses: gradle/gradle-build-action@v2
26 | with:
27 | arguments: test runPluginVerifier ${{ matrix.version }} --stacktrace
28 | - name: Show Reports
29 | uses: actions/upload-artifact@v1
30 | if: failure()
31 | with:
32 | name: reports
33 | path: build/reports/
34 |
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | name: Release to Prod Channel
2 |
3 | on:
4 | release:
5 | types: [published]
6 | jobs:
7 | release:
8 | name: Release
9 | runs-on: ubuntu-latest
10 | env:
11 | GRADLE_OPTS: "-Xmx6g -Xms4g"
12 | steps:
13 | - uses: actions/checkout@v3
14 | - name: Semantic Version
15 | id: version
16 | uses: ncipollo/semantic-version-action@v1
17 | - name: Set up JDK 17
18 | uses: actions/setup-java@v3
19 | with:
20 | java-version: 17
21 | distribution: zulu
22 | - uses: gradle/gradle-build-action@v2
23 | with:
24 | arguments: publishPlugin -PpublishPluginToken=${{ secrets.JB_PLUGINS_TOKEN }} -PideVersion=IC-2023.2 -PpluginVersion=${{ steps.version.outputs.tag }}
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | \.idea/
2 | out/
3 |
4 | CodeNarc Updated\.zip
5 |
6 | .gradle/
7 |
8 | atlassian-ide-plugin.xml
9 |
10 | *.iml
11 |
12 | build/
13 | bin/
14 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CodeNarc IntelliJ Plugin
2 |
3 | ## Development
4 |
5 | To run the plugin locally run `./gradlew runIde`
6 |
7 | ## Beta Channel
8 | Feel free to join the beta channel here: https://plugins.jetbrains.com/plugins/beta/5925
9 |
10 | 
11 |
12 | 
13 |
14 | ## Known Issues
15 |
16 | There is [a random issue with `StackOverflowError`](https://github.com/melix/codenarc-idea/issues/45) which should have no impact on the IDE.
17 |
18 | ## History
19 |
20 | This is an update to this project:
21 |
22 | https://github.com/seanleblanc/CodeNarc-Updated
23 |
24 | which was an update to this project:
25 |
26 | https://github.com/melix/CodenarcNG
27 |
28 | which was a fork the original project.
29 |
30 | CodeNarc-Updated will be replaced with this plugin.
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/description.html:
--------------------------------------------------------------------------------
1 | CodeNarc analyzes Groovy code for defects, bad practices, inconsistencies, style issues and more.
2 | A flexible framework for rules, rulesets and custom rules means it's easy to configure CodeNarc to
3 | fit into your project. Build tool, framework support, and report generation are all enterprise ready.
4 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | codenarcVersion=3.2.0-groovy-4.0
2 | pluginVersion=7.0.0-SNAPSHOT
3 | groovyVersion=4.0.10
4 | spockVersion=2.3-groovy-4.0
5 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melix/codenarc-idea/567cb81cae1495a3d008fc4e4ab543c22ce6b204/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionSha256Sum=47a5bfed9ef814f90f8debcbbb315e8e7c654109acd224595ea39fca95c5d4da
4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
5 | networkTimeout=10000
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'codenarc-idea'
2 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/CodeNarcBundle.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea;
2 |
3 | import com.intellij.DynamicBundle;
4 | import org.jetbrains.annotations.Nls;
5 | import org.jetbrains.annotations.NonNls;
6 | import org.jetbrains.annotations.NotNull;
7 | import org.jetbrains.annotations.PropertyKey;
8 |
9 | import java.util.function.Supplier;
10 |
11 | public class CodeNarcBundle extends DynamicBundle {
12 |
13 | @NonNls
14 | private static final String BUNDLE = "messages.CodeNarcBundle";
15 | private static final CodeNarcBundle INSTANCE = new CodeNarcBundle();
16 |
17 | private CodeNarcBundle() {
18 | super(BUNDLE);
19 | }
20 |
21 | @NotNull
22 | public static @Nls String message(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object... params) {
23 | return INSTANCE.getMessage(key, params);
24 | }
25 |
26 | @NotNull
27 | public static Supplier messagePointer(@NotNull @PropertyKey(resourceBundle = BUNDLE) String key, Object... params) {
28 | return INSTANCE.getLazyMessage(key, params);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/BooleanGetBooleanInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.BooleanGetBooleanRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class BooleanGetBooleanInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.BooleanGetBooleanRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public BooleanGetBooleanInspectionTool() {
21 | super(new BooleanGetBooleanRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/BrokenNullCheckInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.BrokenNullCheckRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class BrokenNullCheckInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.BrokenNullCheckRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public BrokenNullCheckInspectionTool() {
21 | super(new BrokenNullCheckRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/BrokenOddnessCheckInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.BrokenOddnessCheckRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class BrokenOddnessCheckInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.BrokenOddnessCheckRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public BrokenOddnessCheckInspectionTool() {
21 | super(new BrokenOddnessCheckRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/ClassForNameInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.ClassForNameRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ClassForNameInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.ClassForNameRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public ClassForNameInspectionTool() {
21 | super(new ClassForNameRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/ComparisonWithSelfInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.ComparisonWithSelfRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ComparisonWithSelfInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.ComparisonWithSelfRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public ComparisonWithSelfInspectionTool() {
21 | super(new ComparisonWithSelfRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/ConstantIfExpressionInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.ConstantIfExpressionRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ConstantIfExpressionInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.ConstantIfExpressionRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public ConstantIfExpressionInspectionTool() {
21 | super(new ConstantIfExpressionRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/DoubleNegativeInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.DoubleNegativeRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class DoubleNegativeInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.DoubleNegativeRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public DoubleNegativeInspectionTool() {
21 | super(new DoubleNegativeRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/DuplicateMapKeyInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.DuplicateMapKeyRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class DuplicateMapKeyInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.DuplicateMapKeyRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public DuplicateMapKeyInspectionTool() {
21 | super(new DuplicateMapKeyRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/DuplicateSetValueInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.DuplicateSetValueRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class DuplicateSetValueInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.DuplicateSetValueRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public DuplicateSetValueInspectionTool() {
21 | super(new DuplicateSetValueRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EmptyClassInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EmptyClassRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EmptyClassInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EmptyClassRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EmptyClassInspectionTool() {
21 | super(new EmptyClassRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EmptyElseBlockInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EmptyElseBlockRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EmptyElseBlockInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EmptyElseBlockRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EmptyElseBlockInspectionTool() {
21 | super(new EmptyElseBlockRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EmptyFinallyBlockInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EmptyFinallyBlockRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EmptyFinallyBlockInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EmptyFinallyBlockRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EmptyFinallyBlockInspectionTool() {
21 | super(new EmptyFinallyBlockRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EmptyForStatementInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EmptyForStatementRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EmptyForStatementInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EmptyForStatementRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EmptyForStatementInspectionTool() {
21 | super(new EmptyForStatementRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EmptyIfStatementInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EmptyIfStatementRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EmptyIfStatementInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EmptyIfStatementRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EmptyIfStatementInspectionTool() {
21 | super(new EmptyIfStatementRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EmptyMethodInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EmptyMethodRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EmptyMethodInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EmptyMethodRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EmptyMethodInspectionTool() {
21 | super(new EmptyMethodRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EmptySwitchStatementInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EmptySwitchStatementRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EmptySwitchStatementInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EmptySwitchStatementRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EmptySwitchStatementInspectionTool() {
21 | super(new EmptySwitchStatementRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EmptyTryBlockInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EmptyTryBlockRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EmptyTryBlockInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EmptyTryBlockRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EmptyTryBlockInspectionTool() {
21 | super(new EmptyTryBlockRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EmptyWhileStatementInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EmptyWhileStatementRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EmptyWhileStatementInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EmptyWhileStatementRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EmptyWhileStatementInspectionTool() {
21 | super(new EmptyWhileStatementRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EqualsAndHashCodeInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EqualsAndHashCodeRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EqualsAndHashCodeInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EqualsAndHashCodeRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EqualsAndHashCodeInspectionTool() {
21 | super(new EqualsAndHashCodeRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/EqualsOverloadedInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.EqualsOverloadedRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class EqualsOverloadedInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.EqualsOverloadedRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public EqualsOverloadedInspectionTool() {
21 | super(new EqualsOverloadedRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/IntegerGetIntegerInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.IntegerGetIntegerRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class IntegerGetIntegerInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.IntegerGetIntegerRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public IntegerGetIntegerInspectionTool() {
21 | super(new IntegerGetIntegerRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/basic/RemoveAllOnSelfInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.basic.RemoveAllOnSelfRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class RemoveAllOnSelfInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.basic.RemoveAllOnSelfRule
17 |
18 | public static final String GROUP = "Basic";
19 |
20 | public RemoveAllOnSelfInspectionTool() {
21 | super(new RemoveAllOnSelfRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/braces/ForStatementBracesInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.braces;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.braces.ForStatementBracesRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ForStatementBracesInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.braces.ForStatementBracesRule
17 |
18 | public static final String GROUP = "Braces";
19 |
20 | public ForStatementBracesInspectionTool() {
21 | super(new ForStatementBracesRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/braces/IfStatementBracesInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.braces;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.braces.IfStatementBracesRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class IfStatementBracesInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.braces.IfStatementBracesRule
17 |
18 | public static final String GROUP = "Braces";
19 |
20 | public IfStatementBracesInspectionTool() {
21 | super(new IfStatementBracesRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/comments/ClassJavadocInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.comments;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.comments.ClassJavadocRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ClassJavadocInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.comments.ClassJavadocRule
17 |
18 | public static final String GROUP = "Comments";
19 |
20 | public ClassJavadocInspectionTool() {
21 | super(new ClassJavadocRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToNonMainClasses(boolean value) {
32 | getRule().setApplyToNonMainClasses(value);
33 | }
34 |
35 | public boolean getApplyToNonMainClasses() {
36 | return getRule().getApplyToNonMainClasses();
37 | }
38 |
39 | // custom code can be written after this line and it will be preserved during the regeneration
40 |
41 | @Override
42 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
43 | return Collections.emptyList();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/comments/JavadocEmptyFirstLineInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.comments;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.comments.JavadocEmptyFirstLineRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class JavadocEmptyFirstLineInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.comments.JavadocEmptyFirstLineRule
17 |
18 | public static final String GROUP = "Comments";
19 |
20 | public JavadocEmptyFirstLineInspectionTool() {
21 | super(new JavadocEmptyFirstLineRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 | // custom code can be written after this line and it will be preserved during the regeneration
31 |
32 | @Override
33 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
34 | return Collections.emptyList();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/concurrency/BusyWaitInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.concurrency;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.concurrency.BusyWaitRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class BusyWaitInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.concurrency.BusyWaitRule
17 |
18 | public static final String GROUP = "Concurrency";
19 |
20 | public BusyWaitInspectionTool() {
21 | super(new BusyWaitRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/concurrency/StaticConnectionInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.concurrency;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.concurrency.StaticConnectionRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class StaticConnectionInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.concurrency.StaticConnectionRule
17 |
18 | public static final String GROUP = "Concurrency";
19 |
20 | public StaticConnectionInspectionTool() {
21 | super(new StaticConnectionRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/concurrency/ThreadGroupInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.concurrency;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.concurrency.ThreadGroupRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ThreadGroupInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.concurrency.ThreadGroupRule
17 |
18 | public static final String GROUP = "Concurrency";
19 |
20 | public ThreadGroupInspectionTool() {
21 | super(new ThreadGroupRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/concurrency/ThreadYieldInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.concurrency;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.concurrency.ThreadYieldRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ThreadYieldInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.concurrency.ThreadYieldRule
17 |
18 | public static final String GROUP = "Concurrency";
19 |
20 | public ThreadYieldInspectionTool() {
21 | super(new ThreadYieldRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/convention/ConfusingTernaryInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.convention.ConfusingTernaryRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ConfusingTernaryInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.convention.ConfusingTernaryRule
17 |
18 | public static final String GROUP = "Convention";
19 |
20 | public ConfusingTernaryInspectionTool() {
21 | super(new ConfusingTernaryRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/convention/CouldBeElvisInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.convention.CouldBeElvisRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class CouldBeElvisInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.convention.CouldBeElvisRule
17 |
18 | public static final String GROUP = "Convention";
19 |
20 | public CouldBeElvisInspectionTool() {
21 | super(new CouldBeElvisRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/convention/InvertedConditionInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.convention.InvertedConditionRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class InvertedConditionInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.convention.InvertedConditionRule
17 |
18 | public static final String GROUP = "Convention";
19 |
20 | public InvertedConditionInspectionTool() {
21 | super(new InvertedConditionRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/convention/InvertedIfElseInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.convention.InvertedIfElseRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class InvertedIfElseInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.convention.InvertedIfElseRule
17 |
18 | public static final String GROUP = "Convention";
19 |
20 | public InvertedIfElseInspectionTool() {
21 | super(new InvertedIfElseRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/convention/NoDoubleInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.convention.NoDoubleRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class NoDoubleInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.convention.NoDoubleRule
17 |
18 | public static final String GROUP = "Convention";
19 |
20 | public NoDoubleInspectionTool() {
21 | super(new NoDoubleRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/convention/NoFloatInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.convention.NoFloatRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class NoFloatInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.convention.NoFloatRule
17 |
18 | public static final String GROUP = "Convention";
19 |
20 | public NoFloatInspectionTool() {
21 | super(new NoFloatRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/convention/NoJavaUtilDateInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.convention.NoJavaUtilDateRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class NoJavaUtilDateInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.convention.NoJavaUtilDateRule
17 |
18 | public static final String GROUP = "Convention";
19 |
20 | public NoJavaUtilDateInspectionTool() {
21 | super(new NoJavaUtilDateRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/convention/NoTabCharacterInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.convention.NoTabCharacterRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class NoTabCharacterInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.convention.NoTabCharacterRule
17 |
18 | public static final String GROUP = "Convention";
19 |
20 | public NoTabCharacterInspectionTool() {
21 | super(new NoTabCharacterRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setTabCharacter(String value) {
32 | getRule().setTabCharacter(value);
33 | }
34 |
35 | public String getTabCharacter() {
36 | return getRule().getTabCharacter();
37 | }
38 |
39 | // custom code can be written after this line and it will be preserved during the regeneration
40 |
41 | @Override
42 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
43 | return Collections.emptyList();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/convention/VectorIsObsoleteInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.convention.VectorIsObsoleteRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class VectorIsObsoleteInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.convention.VectorIsObsoleteRule
17 |
18 | public static final String GROUP = "Convention";
19 |
20 | public VectorIsObsoleteInspectionTool() {
21 | super(new VectorIsObsoleteRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/design/LocaleSetDefaultInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.design;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.design.LocaleSetDefaultRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class LocaleSetDefaultInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.design.LocaleSetDefaultRule
17 |
18 | public static final String GROUP = "Design";
19 |
20 | public LocaleSetDefaultInspectionTool() {
21 | super(new LocaleSetDefaultRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/design/NestedForLoopInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.design;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.design.NestedForLoopRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class NestedForLoopInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.design.NestedForLoopRule
17 |
18 | public static final String GROUP = "Design";
19 |
20 | public NestedForLoopInspectionTool() {
21 | super(new NestedForLoopRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/design/OptionalFieldInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.design;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.design.OptionalFieldRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class OptionalFieldInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.design.OptionalFieldRule
17 |
18 | public static final String GROUP = "Design";
19 |
20 | public OptionalFieldInspectionTool() {
21 | super(new OptionalFieldRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/design/PublicInstanceFieldInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.design;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.design.PublicInstanceFieldRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class PublicInstanceFieldInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.design.PublicInstanceFieldRule
17 |
18 | public static final String GROUP = "Design";
19 |
20 | public PublicInstanceFieldInspectionTool() {
21 | super(new PublicInstanceFieldRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/design/ToStringReturnsNullInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.design;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.design.ToStringReturnsNullRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ToStringReturnsNullInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.design.ToStringReturnsNullRule
17 |
18 | public static final String GROUP = "Design";
19 |
20 | public ToStringReturnsNullInspectionTool() {
21 | super(new ToStringReturnsNullRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/exceptions/CatchErrorInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.exceptions;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.exceptions.CatchErrorRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class CatchErrorInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.exceptions.CatchErrorRule
17 |
18 | public static final String GROUP = "Exceptions";
19 |
20 | public CatchErrorInspectionTool() {
21 | super(new CatchErrorRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/exceptions/CatchExceptionInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.exceptions;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.exceptions.CatchExceptionRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class CatchExceptionInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.exceptions.CatchExceptionRule
17 |
18 | public static final String GROUP = "Exceptions";
19 |
20 | public CatchExceptionInspectionTool() {
21 | super(new CatchExceptionRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/exceptions/CatchThrowableInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.exceptions;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.exceptions.CatchThrowableRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class CatchThrowableInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.exceptions.CatchThrowableRule
17 |
18 | public static final String GROUP = "Exceptions";
19 |
20 | public CatchThrowableInspectionTool() {
21 | super(new CatchThrowableRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/exceptions/ThrowErrorInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.exceptions;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.exceptions.ThrowErrorRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ThrowErrorInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.exceptions.ThrowErrorRule
17 |
18 | public static final String GROUP = "Exceptions";
19 |
20 | public ThrowErrorInspectionTool() {
21 | super(new ThrowErrorRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/exceptions/ThrowExceptionInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.exceptions;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.exceptions.ThrowExceptionRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ThrowExceptionInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.exceptions.ThrowExceptionRule
17 |
18 | public static final String GROUP = "Exceptions";
19 |
20 | public ThrowExceptionInspectionTool() {
21 | super(new ThrowExceptionRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/exceptions/ThrowThrowableInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.exceptions;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.exceptions.ThrowThrowableRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ThrowThrowableInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.exceptions.ThrowThrowableRule
17 |
18 | public static final String GROUP = "Exceptions";
19 |
20 | public ThrowThrowableInspectionTool() {
21 | super(new ThrowThrowableRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/BlankLineBeforePackageInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInsight.daemon.impl.quickfix.DeleteElementFix;
4 | import com.intellij.codeInspection.LocalQuickFix;
5 | import com.intellij.psi.PsiElement;
6 | import java.util.Collection;
7 | import java.util.Collections;
8 | import javax.annotation.Generated;
9 | import org.codenarc.idea.CodeNarcInspectionTool;
10 | import org.codenarc.rule.Violation;
11 | import org.codenarc.rule.formatting.BlankLineBeforePackageRule;
12 | import org.jetbrains.annotations.NotNull;
13 |
14 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
15 | public class BlankLineBeforePackageInspectionTool extends CodeNarcInspectionTool {
16 |
17 | // this code has been generated from org.codenarc.rule.formatting.BlankLineBeforePackageRule
18 |
19 | public static final String GROUP = "Formatting";
20 |
21 | public BlankLineBeforePackageInspectionTool() {
22 | super(new BlankLineBeforePackageRule());
23 | applyDefaultConfiguration(getRule());
24 | }
25 |
26 | @Override
27 | public String getRuleset() {
28 | return GROUP;
29 | }
30 |
31 | // custom code can be written after this line and it will be preserved during the regeneration
32 |
33 | @Override
34 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
35 | return Collections.singleton(new DeleteElementFix(violatingElement));
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/BracesForClassInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.BracesForClassRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class BracesForClassInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.BracesForClassRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public BracesForClassInspectionTool() {
21 | super(new BracesForClassRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setSameLine(boolean value) {
32 | getRule().setSameLine(value);
33 | }
34 |
35 | public boolean getSameLine() {
36 | return getRule().getSameLine();
37 | }
38 |
39 | // custom code can be written after this line and it will be preserved during the regeneration
40 |
41 | @Override
42 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
43 | return Collections.emptyList();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/ConsecutiveBlankLinesInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInsight.daemon.impl.quickfix.DeleteElementFix;
4 | import com.intellij.codeInspection.LocalQuickFix;
5 | import com.intellij.psi.PsiElement;
6 | import java.util.Collection;
7 | import java.util.Collections;
8 | import javax.annotation.Generated;
9 | import org.codenarc.idea.CodeNarcInspectionTool;
10 | import org.codenarc.rule.Violation;
11 | import org.codenarc.rule.formatting.ConsecutiveBlankLinesRule;
12 | import org.jetbrains.annotations.NotNull;
13 |
14 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
15 | public class ConsecutiveBlankLinesInspectionTool extends CodeNarcInspectionTool {
16 |
17 | // this code has been generated from org.codenarc.rule.formatting.ConsecutiveBlankLinesRule
18 |
19 | public static final String GROUP = "Formatting";
20 |
21 | public ConsecutiveBlankLinesInspectionTool() {
22 | super(new ConsecutiveBlankLinesRule());
23 | applyDefaultConfiguration(getRule());
24 | }
25 |
26 | @Override
27 | public String getRuleset() {
28 | return GROUP;
29 | }
30 |
31 | // custom code can be written after this line and it will be preserved during the regeneration
32 |
33 | @Override
34 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
35 | return Collections.singleton(new DeleteElementFix(violatingElement));
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/FileEndsWithoutNewlineInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.FileEndsWithoutNewlineRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class FileEndsWithoutNewlineInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.FileEndsWithoutNewlineRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public FileEndsWithoutNewlineInspectionTool() {
21 | super(new FileEndsWithoutNewlineRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 | // custom code can be written after this line and it will be preserved during the regeneration
31 |
32 | @Override
33 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
34 | return Collections.emptyList();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/MissingBlankLineAfterImportsInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.MissingBlankLineAfterImportsRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class MissingBlankLineAfterImportsInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.MissingBlankLineAfterImportsRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public MissingBlankLineAfterImportsInspectionTool() {
21 | super(new MissingBlankLineAfterImportsRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 | // custom code can be written after this line and it will be preserved during the regeneration
31 |
32 | @Override
33 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
34 | return Collections.emptyList();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/MissingBlankLineAfterPackageInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.MissingBlankLineAfterPackageRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class MissingBlankLineAfterPackageInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.MissingBlankLineAfterPackageRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public MissingBlankLineAfterPackageInspectionTool() {
21 | super(new MissingBlankLineAfterPackageRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 | // custom code can be written after this line and it will be preserved during the regeneration
31 |
32 | @Override
33 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
34 | return Collections.emptyList();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/SpaceAfterCatchInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.SpaceAfterCatchRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class SpaceAfterCatchInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.SpaceAfterCatchRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public SpaceAfterCatchInspectionTool() {
21 | super(new SpaceAfterCatchRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/SpaceAfterCommaInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.SpaceAfterCommaRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class SpaceAfterCommaInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.SpaceAfterCommaRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public SpaceAfterCommaInspectionTool() {
21 | super(new SpaceAfterCommaRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/SpaceAfterForInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.SpaceAfterForRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class SpaceAfterForInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.SpaceAfterForRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public SpaceAfterForInspectionTool() {
21 | super(new SpaceAfterForRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/SpaceAfterIfInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.SpaceAfterIfRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class SpaceAfterIfInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.SpaceAfterIfRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public SpaceAfterIfInspectionTool() {
21 | super(new SpaceAfterIfRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/SpaceAfterSwitchInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.SpaceAfterSwitchRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class SpaceAfterSwitchInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.SpaceAfterSwitchRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public SpaceAfterSwitchInspectionTool() {
21 | super(new SpaceAfterSwitchRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/SpaceAfterWhileInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.SpaceAfterWhileRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class SpaceAfterWhileInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.SpaceAfterWhileRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public SpaceAfterWhileInspectionTool() {
21 | super(new SpaceAfterWhileRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/formatting/TrailingWhitespaceInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.formatting;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.formatting.TrailingWhitespaceRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class TrailingWhitespaceInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.formatting.TrailingWhitespaceRule
17 |
18 | public static final String GROUP = "Formatting";
19 |
20 | public TrailingWhitespaceInspectionTool() {
21 | super(new TrailingWhitespaceRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 | // custom code can be written after this line and it will be preserved during the regeneration
31 |
32 | @Override
33 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
34 | return Collections.emptyList();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/generic/IllegalRegexInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.generic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.generic.IllegalRegexRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class IllegalRegexInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.generic.IllegalRegexRule
17 |
18 | public static final String GROUP = "Generic";
19 |
20 | public IllegalRegexInspectionTool() {
21 | super(new IllegalRegexRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setRegex(String value) {
32 | getRule().setRegex(value);
33 | }
34 |
35 | public String getRegex() {
36 | return getRule().getRegex();
37 | }
38 |
39 | // custom code can be written after this line and it will be preserved during the regeneration
40 |
41 | @Override
42 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
43 | return Collections.emptyList();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/generic/IllegalStringInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.generic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.generic.IllegalStringRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class IllegalStringInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.generic.IllegalStringRule
17 |
18 | public static final String GROUP = "Generic";
19 |
20 | public IllegalStringInspectionTool() {
21 | super(new IllegalStringRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setString(String value) {
32 | getRule().setString(value);
33 | }
34 |
35 | public String getString() {
36 | return getRule().getString();
37 | }
38 |
39 | // custom code can be written after this line and it will be preserved during the regeneration
40 |
41 | @Override
42 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
43 | return Collections.emptyList();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/generic/RequiredRegexInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.generic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.generic.RequiredRegexRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class RequiredRegexInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.generic.RequiredRegexRule
17 |
18 | public static final String GROUP = "Generic";
19 |
20 | public RequiredRegexInspectionTool() {
21 | super(new RequiredRegexRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setRegex(String value) {
32 | getRule().setRegex(value);
33 | }
34 |
35 | public String getRegex() {
36 | return getRule().getRegex();
37 | }
38 |
39 | // custom code can be written after this line and it will be preserved during the regeneration
40 |
41 | @Override
42 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
43 | return Collections.emptyList();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/generic/RequiredStringInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.generic;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.generic.RequiredStringRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class RequiredStringInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.generic.RequiredStringRule
17 |
18 | public static final String GROUP = "Generic";
19 |
20 | public RequiredStringInspectionTool() {
21 | super(new RequiredStringRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setString(String value) {
32 | getRule().setString(value);
33 | }
34 |
35 | public String getString() {
36 | return getRule().getString();
37 | }
38 |
39 | // custom code can be written after this line and it will be preserved during the regeneration
40 |
41 | @Override
42 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
43 | return Collections.emptyList();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/groovyism/GStringAsMapKeyInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.groovyism;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.groovyism.GStringAsMapKeyRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class GStringAsMapKeyInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.groovyism.GStringAsMapKeyRule
17 |
18 | public static final String GROUP = "Groovyism";
19 |
20 | public GStringAsMapKeyInspectionTool() {
21 | super(new GStringAsMapKeyRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/groovyism/UseCollectManyInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.groovyism;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.groovyism.UseCollectManyRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class UseCollectManyInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.groovyism.UseCollectManyRule
17 |
18 | public static final String GROUP = "Groovyism";
19 |
20 | public UseCollectManyInspectionTool() {
21 | super(new UseCollectManyRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/groovyism/UseCollectNestedInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.groovyism;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.groovyism.UseCollectNestedRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class UseCollectNestedInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.groovyism.UseCollectNestedRule
17 |
18 | public static final String GROUP = "Groovyism";
19 |
20 | public UseCollectNestedInspectionTool() {
21 | super(new UseCollectNestedRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/imports/DuplicateImportInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.imports;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.imports.DuplicateImportRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class DuplicateImportInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.imports.DuplicateImportRule
17 |
18 | public static final String GROUP = "Imports";
19 |
20 | public DuplicateImportInspectionTool() {
21 | super(new DuplicateImportRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 | // custom code can be written after this line and it will be preserved during the regeneration
31 |
32 | @Override
33 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
34 | return Collections.emptyList();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/imports/ImportFromSamePackageInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.imports;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.imports.ImportFromSamePackageRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ImportFromSamePackageInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.imports.ImportFromSamePackageRule
17 |
18 | public static final String GROUP = "Imports";
19 |
20 | public ImportFromSamePackageInspectionTool() {
21 | super(new ImportFromSamePackageRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 | // custom code can be written after this line and it will be preserved during the regeneration
31 |
32 | @Override
33 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
34 | return Collections.emptyList();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/imports/MisorderedStaticImportsInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.imports;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.imports.MisorderedStaticImportsRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class MisorderedStaticImportsInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.imports.MisorderedStaticImportsRule
17 |
18 | public static final String GROUP = "Imports";
19 |
20 | public MisorderedStaticImportsInspectionTool() {
21 | super(new MisorderedStaticImportsRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setComesBefore(boolean value) {
32 | getRule().setComesBefore(value);
33 | }
34 |
35 | public boolean getComesBefore() {
36 | return getRule().getComesBefore();
37 | }
38 |
39 | // custom code can be written after this line and it will be preserved during the regeneration
40 |
41 | @Override
42 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
43 | return Collections.emptyList();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/imports/UnnecessaryGroovyImportInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.imports;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.imports.UnnecessaryGroovyImportRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class UnnecessaryGroovyImportInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.imports.UnnecessaryGroovyImportRule
17 |
18 | public static final String GROUP = "Imports";
19 |
20 | public UnnecessaryGroovyImportInspectionTool() {
21 | super(new UnnecessaryGroovyImportRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 | // custom code can be written after this line and it will be preserved during the regeneration
31 |
32 | @Override
33 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
34 | return Collections.emptyList();
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/imports/UnusedImportInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.imports;
2 |
3 | import com.intellij.codeInsight.daemon.impl.quickfix.DeleteElementFix;
4 | import com.intellij.codeInspection.CleanupLocalInspectionTool;
5 | import com.intellij.codeInspection.LocalQuickFix;
6 | import com.intellij.psi.PsiElement;
7 | import java.util.Collection;
8 | import java.util.Collections;
9 | import javax.annotation.Generated;
10 | import org.codenarc.idea.CodeNarcInspectionTool;
11 | import org.codenarc.rule.Violation;
12 | import org.codenarc.rule.imports.UnusedImportRule;
13 | import org.jetbrains.annotations.NotNull;
14 |
15 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
16 | public class UnusedImportInspectionTool extends CodeNarcInspectionTool implements CleanupLocalInspectionTool {
17 |
18 | // this code has been generated from org.codenarc.rule.imports.UnusedImportRule
19 |
20 | public static final String GROUP = "Imports";
21 |
22 | public UnusedImportInspectionTool() {
23 | super(new UnusedImportRule());
24 | applyDefaultConfiguration(getRule());
25 | }
26 |
27 | @Override
28 | public String getRuleset() {
29 | return GROUP;
30 | }
31 |
32 | // custom code can be written after this line and it will be preserved during the regeneration
33 |
34 | @Override
35 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
36 | return Collections.singleton(new DeleteElementFix(violatingElement));
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/junit/ChainedTestInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.junit;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.junit.ChainedTestRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ChainedTestInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.junit.ChainedTestRule
17 |
18 | public static final String GROUP = "Junit";
19 |
20 | public ChainedTestInspectionTool() {
21 | super(new ChainedTestRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/junit/CoupledTestCaseInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.junit;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.junit.CoupledTestCaseRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class CoupledTestCaseInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.junit.CoupledTestCaseRule
17 |
18 | public static final String GROUP = "Junit";
19 |
20 | public CoupledTestCaseInspectionTool() {
21 | super(new CoupledTestCaseRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/junit/JUnitLostTestInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.junit;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.junit.JUnitLostTestRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class JUnitLostTestInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.junit.JUnitLostTestRule
17 |
18 | public static final String GROUP = "Junit";
19 |
20 | public JUnitLostTestInspectionTool() {
21 | super(new JUnitLostTestRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/junit/JUnitSetUpCallsSuperInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.junit;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.junit.JUnitSetUpCallsSuperRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class JUnitSetUpCallsSuperInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.junit.JUnitSetUpCallsSuperRule
17 |
18 | public static final String GROUP = "Junit";
19 |
20 | public JUnitSetUpCallsSuperInspectionTool() {
21 | super(new JUnitSetUpCallsSuperRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/junit/JUnitStyleAssertionsInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.junit;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.junit.JUnitStyleAssertionsRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class JUnitStyleAssertionsInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.junit.JUnitStyleAssertionsRule
17 |
18 | public static final String GROUP = "Junit";
19 |
20 | public JUnitStyleAssertionsInspectionTool() {
21 | super(new JUnitStyleAssertionsRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/junit/UnnecessaryFailInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.junit;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.junit.UnnecessaryFailRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class UnnecessaryFailInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.junit.UnnecessaryFailRule
17 |
18 | public static final String GROUP = "Junit";
19 |
20 | public UnnecessaryFailInspectionTool() {
21 | super(new UnnecessaryFailRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/logging/MultipleLoggersInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.logging;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.logging.MultipleLoggersRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class MultipleLoggersInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.logging.MultipleLoggersRule
17 |
18 | public static final String GROUP = "Logging";
19 |
20 | public MultipleLoggersInspectionTool() {
21 | super(new MultipleLoggersRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/logging/PrintStackTraceInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.logging;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.logging.PrintStackTraceRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class PrintStackTraceInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.logging.PrintStackTraceRule
17 |
18 | public static final String GROUP = "Logging";
19 |
20 | public PrintStackTraceInspectionTool() {
21 | super(new PrintStackTraceRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/logging/SystemErrPrintInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.logging;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.logging.SystemErrPrintRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class SystemErrPrintInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.logging.SystemErrPrintRule
17 |
18 | public static final String GROUP = "Logging";
19 |
20 | public SystemErrPrintInspectionTool() {
21 | super(new SystemErrPrintRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/logging/SystemOutPrintInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.logging;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.logging.SystemOutPrintRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class SystemOutPrintInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.logging.SystemOutPrintRule
17 |
18 | public static final String GROUP = "Logging";
19 |
20 | public SystemOutPrintInspectionTool() {
21 | super(new SystemOutPrintRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/naming/ClassNameSameAsFilenameInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.naming;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.naming.ClassNameSameAsFilenameRule;
11 | import org.jetbrains.annotations.NotNull;
12 | import org.jetbrains.plugins.groovy.codeInspection.naming.RenameFix;
13 |
14 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
15 | public class ClassNameSameAsFilenameInspectionTool extends CodeNarcInspectionTool {
16 |
17 | // this code has been generated from org.codenarc.rule.naming.ClassNameSameAsFilenameRule
18 |
19 | public static final String GROUP = "Naming";
20 |
21 | public ClassNameSameAsFilenameInspectionTool() {
22 | super(new ClassNameSameAsFilenameRule());
23 | applyDefaultConfiguration(getRule());
24 | }
25 |
26 | @Override
27 | public String getRuleset() {
28 | return GROUP;
29 | }
30 |
31 | // custom code can be written after this line and it will be preserved during the regeneration
32 |
33 | @Override
34 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
35 | return Collections.singleton(new RenameFix());
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/naming/PackageNameMatchesFilePathInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.naming;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.naming.PackageNameMatchesFilePathRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class PackageNameMatchesFilePathInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.naming.PackageNameMatchesFilePathRule
17 |
18 | public static final String GROUP = "Naming";
19 |
20 | public PackageNameMatchesFilePathInspectionTool() {
21 | super(new PackageNameMatchesFilePathRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setGroupId(String value) {
32 | getRule().setGroupId(value);
33 | }
34 |
35 | public String getGroupId() {
36 | return getRule().getGroupId();
37 | }
38 |
39 | // custom code can be written after this line and it will be preserved during the regeneration
40 |
41 | @Override
42 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
43 | return Collections.emptyList();
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/security/InsecureRandomInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.security;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.security.InsecureRandomRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class InsecureRandomInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.security.InsecureRandomRule
17 |
18 | public static final String GROUP = "Security";
19 |
20 | public InsecureRandomInspectionTool() {
21 | super(new InsecureRandomRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/security/ObjectFinalizeInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.security;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.security.ObjectFinalizeRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class ObjectFinalizeInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.security.ObjectFinalizeRule
17 |
18 | public static final String GROUP = "Security";
19 |
20 | public ObjectFinalizeInspectionTool() {
21 | super(new ObjectFinalizeRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/security/SystemExitInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.security;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.security.SystemExitRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class SystemExitInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.security.SystemExitRule
17 |
18 | public static final String GROUP = "Security";
19 |
20 | public SystemExitInspectionTool() {
21 | super(new SystemExitRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/unnecessary/AddEmptyStringInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.unnecessary;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.unnecessary.AddEmptyStringRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class AddEmptyStringInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.unnecessary.AddEmptyStringRule
17 |
18 | public static final String GROUP = "Unnecessary";
19 |
20 | public AddEmptyStringInspectionTool() {
21 | super(new AddEmptyStringRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/unnecessary/UnnecessaryCastInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.unnecessary;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.unnecessary.UnnecessaryCastRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class UnnecessaryCastInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.unnecessary.UnnecessaryCastRule
17 |
18 | public static final String GROUP = "Unnecessary";
19 |
20 | public UnnecessaryCastInspectionTool() {
21 | super(new UnnecessaryCastRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/unused/UnusedArrayInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.unused;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.unused.UnusedArrayRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class UnusedArrayInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.unused.UnusedArrayRule
17 |
18 | public static final String GROUP = "Unused";
19 |
20 | public UnusedArrayInspectionTool() {
21 | super(new UnusedArrayRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/inspections/unused/UnusedObjectInspectionTool.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.unused;
2 |
3 | import com.intellij.codeInspection.LocalQuickFix;
4 | import com.intellij.psi.PsiElement;
5 | import java.util.Collection;
6 | import java.util.Collections;
7 | import javax.annotation.Generated;
8 | import org.codenarc.idea.CodeNarcInspectionTool;
9 | import org.codenarc.rule.Violation;
10 | import org.codenarc.rule.unused.UnusedObjectRule;
11 | import org.jetbrains.annotations.NotNull;
12 |
13 | @Generated("You can customize this class at the end of the file or remove this annotation to skip regeneration completely")
14 | public class UnusedObjectInspectionTool extends CodeNarcInspectionTool {
15 |
16 | // this code has been generated from org.codenarc.rule.unused.UnusedObjectRule
17 |
18 | public static final String GROUP = "Unused";
19 |
20 | public UnusedObjectInspectionTool() {
21 | super(new UnusedObjectRule());
22 | applyDefaultConfiguration(getRule());
23 | }
24 |
25 | @Override
26 | public String getRuleset() {
27 | return GROUP;
28 | }
29 |
30 |
31 | public void setApplyToClassNames(String value) {
32 | getRule().setApplyToClassNames(value);
33 | }
34 |
35 | public String getApplyToClassNames() {
36 | return getRule().getApplyToClassNames();
37 | }
38 |
39 |
40 | public void setDoNotApplyToClassNames(String value) {
41 | getRule().setDoNotApplyToClassNames(value);
42 | }
43 |
44 | public String getDoNotApplyToClassNames() {
45 | return getRule().getDoNotApplyToClassNames();
46 | }
47 |
48 | // custom code can be written after this line and it will be preserved during the regeneration
49 |
50 | @Override
51 | protected @NotNull Collection getQuickFixesFor(Violation violation, PsiElement violatingElement) {
52 | return Collections.emptyList();
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/quickfix/AddExplicitReturnQuickFix.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.quickfix;
2 |
3 | import com.intellij.codeInspection.ProblemDescriptor;
4 | import com.intellij.codeInspection.util.IntentionFamilyName;
5 | import com.intellij.openapi.project.Project;
6 | import com.intellij.psi.PsiElement;
7 | import com.intellij.util.IncorrectOperationException;
8 | import org.codenarc.idea.CodeNarcBundle;
9 | import org.jetbrains.annotations.NotNull;
10 | import org.jetbrains.plugins.groovy.codeInspection.GroovyFix;
11 | import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrStatement;
12 | import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrCodeBlock;
13 |
14 | import java.util.Arrays;
15 |
16 | public class AddExplicitReturnQuickFix extends GroovyFix {
17 |
18 | @Override
19 | protected void doFix(@NotNull Project project, @NotNull ProblemDescriptor problemDescriptor) throws IncorrectOperationException {
20 | PsiElement psiElement = problemDescriptor.getPsiElement();
21 |
22 | GrCodeBlock body = Arrays.stream(psiElement.getChildren()).filter(e -> e instanceof GrCodeBlock).findFirst().map(GrCodeBlock.class::cast).orElse(null);
23 |
24 | if (body == null) {
25 | return;
26 | }
27 |
28 | GrStatement[] statements = body.getStatements();
29 |
30 | if (statements.length == 0) {
31 | return;
32 | }
33 |
34 | GrStatement lastStatement = statements[statements.length - 1];
35 |
36 | replaceStatement(lastStatement, "return " + lastStatement.getText());
37 |
38 | System.out.println(lastStatement);
39 | }
40 |
41 | @Override
42 | public @IntentionFamilyName @NotNull String getFamilyName() {
43 | return CodeNarcBundle.message("add.explicit.return");
44 | }
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/quickfix/ConvertGStringToStringReusableIntention.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.quickfix;
2 |
3 | import com.intellij.openapi.editor.Editor;
4 | import com.intellij.openapi.project.Project;
5 | import com.intellij.psi.PsiElement;
6 | import com.intellij.util.IncorrectOperationException;
7 | import org.jetbrains.annotations.NotNull;
8 | import org.jetbrains.plugins.groovy.intentions.base.PsiElementPredicate;
9 | import org.jetbrains.plugins.groovy.intentions.conversions.strings.ConvertGStringToStringIntention;
10 |
11 | public class ConvertGStringToStringReusableIntention extends ConvertGStringToStringIntention implements ReusableIntention {
12 |
13 | @Override
14 | public void processIntention(@NotNull PsiElement element, @NotNull Project project, Editor editor) throws IncorrectOperationException {
15 | super.processIntention(element, project, editor);
16 | }
17 |
18 | @NotNull
19 | @Override
20 | public PsiElementPredicate getElementPredicate() {
21 | return super.getElementPredicate();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/quickfix/RemoveRedundantClassPropertyReusableIntention.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.quickfix;
2 |
3 | import com.intellij.openapi.editor.Editor;
4 | import com.intellij.openapi.project.Project;
5 | import com.intellij.psi.PsiElement;
6 | import com.intellij.util.IncorrectOperationException;
7 | import org.jetbrains.annotations.NotNull;
8 | import org.jetbrains.plugins.groovy.intentions.base.PsiElementPredicate;
9 | import org.jetbrains.plugins.groovy.intentions.style.RemoveRedundantClassPropertyIntention;
10 |
11 | public class RemoveRedundantClassPropertyReusableIntention extends RemoveRedundantClassPropertyIntention implements ReusableIntention {
12 |
13 | @Override
14 | public void processIntention(@NotNull PsiElement element, @NotNull Project project, Editor editor) throws IncorrectOperationException {
15 | super.processIntention(element, project, editor);
16 | }
17 |
18 | @NotNull
19 | @Override
20 | public PsiElementPredicate getElementPredicate() {
21 | return super.getElementPredicate();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/quickfix/RemoveUnnecessaryReturnReusableIntention.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.quickfix;
2 |
3 | import com.intellij.openapi.editor.Editor;
4 | import com.intellij.openapi.project.Project;
5 | import com.intellij.psi.PsiElement;
6 | import com.intellij.util.IncorrectOperationException;
7 | import org.jetbrains.annotations.NotNull;
8 | import org.jetbrains.plugins.groovy.intentions.base.PsiElementPredicate;
9 | import org.jetbrains.plugins.groovy.intentions.style.RemoveUnnecessaryReturnIntention;
10 |
11 | public class RemoveUnnecessaryReturnReusableIntention extends RemoveUnnecessaryReturnIntention implements ReusableIntention {
12 |
13 | @Override
14 | public void processIntention(@NotNull PsiElement element, @NotNull Project project, Editor editor) throws IncorrectOperationException {
15 | super.processIntention(element, project, editor);
16 | }
17 |
18 | @NotNull
19 | @Override
20 | public PsiElementPredicate getElementPredicate() {
21 | return super.getElementPredicate();
22 | }
23 |
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/quickfix/ReplacePrintlnWithAnnotationFix.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.quickfix;
2 |
3 | import com.intellij.codeInsight.intention.AddAnnotationPsiFix;
4 | import com.intellij.codeInspection.ProblemDescriptor;
5 | import com.intellij.openapi.project.Project;
6 | import com.intellij.psi.PsiClass;
7 | import com.intellij.psi.PsiNameValuePair;
8 | import com.intellij.psi.util.PsiUtil;
9 | import com.intellij.util.IncorrectOperationException;
10 | import groovy.util.logging.Slf4j;
11 | import org.codenarc.idea.CodeNarcBundle;
12 | import org.jetbrains.annotations.NotNull;
13 | import org.jetbrains.plugins.groovy.codeInspection.GroovyFix;
14 | import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrMethodCall;
15 |
16 | public class ReplacePrintlnWithAnnotationFix extends GroovyFix {
17 |
18 | @Override
19 | protected void doFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) throws IncorrectOperationException {
20 | PsiClass topLevelClass = PsiUtil.getTopLevelClass(descriptor.getPsiElement());
21 |
22 | if (topLevelClass == null) {
23 | return;
24 | }
25 |
26 | new AddAnnotationPsiFix(Slf4j.class.getName(), topLevelClass, new PsiNameValuePair[0]).applyFix();
27 | new ReplaceStatementFix(GrMethodCall.class, "println", "log.info").applyFix(project, descriptor);
28 | }
29 |
30 | @Override
31 | public @NotNull String getFamilyName() {
32 | return CodeNarcBundle.message("use.logging.instead.of.println");
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/quickfix/ReplaceStatementFix.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.quickfix;
2 |
3 | import com.intellij.codeInspection.ProblemDescriptor;
4 | import com.intellij.openapi.project.Project;
5 | import com.intellij.psi.PsiElement;
6 | import com.intellij.util.IncorrectOperationException;
7 | import org.codenarc.idea.CodeNarcBundle;
8 | import org.jetbrains.annotations.NotNull;
9 | import org.jetbrains.plugins.groovy.codeInspection.GroovyFix;
10 | import org.jetbrains.plugins.groovy.lang.psi.api.statements.GrStatement;
11 |
12 | public class ReplaceStatementFix extends GroovyFix {
13 |
14 | private final Class extends GrStatement> target;
15 | private final String original;
16 | private final String replacement;
17 |
18 | public ReplaceStatementFix(Class extends GrStatement> target, String original, String replacement) {
19 | this.target = target;
20 | this.original = original;
21 | this.replacement = replacement;
22 | }
23 |
24 | @Override
25 | public @NotNull String getFamilyName() {
26 | return CodeNarcBundle.message("replace.text", original, replacement);
27 | }
28 |
29 | @Override
30 | protected void doFix(@NotNull Project project, @NotNull ProblemDescriptor descriptor) throws IncorrectOperationException {
31 | replaceCode(descriptor.getPsiElement());
32 | }
33 |
34 | private boolean replaceCode(@NotNull PsiElement element) {
35 | if (target.isInstance(element)) {
36 | replaceCode((GrStatement) element, element.getText());
37 | return true;
38 | }
39 |
40 | for (PsiElement child : element.getChildren()) {
41 | if (replaceCode(child)) {
42 | return true;
43 | }
44 | }
45 |
46 | return false;
47 | }
48 |
49 | private void replaceCode(@NotNull GrStatement statement, String text) {
50 | replaceStatement(statement, text.replace(original, replacement));
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/org/codenarc/idea/quickfix/ReusableIntention.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.quickfix;
2 |
3 | import com.intellij.codeInsight.intention.IntentionAction;
4 | import com.intellij.openapi.editor.Editor;
5 | import com.intellij.openapi.project.Project;
6 | import com.intellij.psi.PsiElement;
7 | import com.intellij.util.IncorrectOperationException;
8 | import org.jetbrains.annotations.NotNull;
9 | import org.jetbrains.plugins.groovy.intentions.base.PsiElementPredicate;
10 |
11 | /**
12 | * Exposes internal protected methods of {@link org.jetbrains.plugins.groovy.intentions.base.Intention} to allow using it as quick fix.
13 | */
14 | public interface ReusableIntention extends IntentionAction {
15 |
16 | void processIntention(@NotNull PsiElement element, @NotNull Project project, Editor editor) throws IncorrectOperationException;
17 |
18 | @NotNull
19 | PsiElementPredicate getElementPredicate();
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/main/resources/messages/CodeNarcBundle.properties:
--------------------------------------------------------------------------------
1 | add.explicit.return=Add explicit return statement
2 | add.modifier=Add {0} modifier
3 | replace.text=Replace {0} with {1}
4 | use.logging.instead.of.println=Use Slf4j instead of println
5 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/inspections/basic/AssignmentInConditionalInspectionToolSpec.groovy:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.basic
2 |
3 | import com.intellij.codeInspection.LocalInspectionTool
4 | import groovy.transform.CompileDynamic
5 | import org.codenarc.idea.testing.InspectionSpec
6 |
7 | @CompileDynamic
8 | class AssignmentInConditionalInspectionToolSpec extends InspectionSpec {
9 |
10 | @Override
11 | protected LocalInspectionTool createInspection() {
12 | return new AssignmentInConditionalInspectionTool()
13 | }
14 |
15 | @Override
16 | protected Iterable getClassesToInclude() {
17 | return Collections.singleton(JAVA_LANG_STRING)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/inspections/convention/ImplicitReturnStatementInspectionToolSpec.groovy:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.convention
2 |
3 | import com.intellij.codeInspection.LocalInspectionTool
4 | import groovy.transform.CompileDynamic
5 | import org.codenarc.idea.testing.InspectionSpec
6 |
7 | @CompileDynamic
8 | class ImplicitReturnStatementInspectionToolSpec extends InspectionSpec {
9 |
10 | @Override
11 | protected LocalInspectionTool createInspection() {
12 | return new ImplicitReturnStatementInspectionTool()
13 | }
14 |
15 | @Override
16 | protected Iterable getClassesToInclude() {
17 | return Collections.singleton(JAVA_LANG_STRING)
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/inspections/groovyism/AssignCollectionSortInspectionToolSpec.groovy:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.groovyism
2 |
3 | import com.intellij.codeInspection.LocalInspectionTool
4 | import org.codenarc.idea.testing.InspectionSpec
5 |
6 | class AssignCollectionSortInspectionToolSpec extends InspectionSpec {
7 |
8 | @Override
9 | protected LocalInspectionTool createInspection() {
10 | return new AssignCollectionSortInspectionTool()
11 | }
12 |
13 | @Override
14 | protected Iterable getClassesToInclude() {
15 | return Collections.singleton(JAVA_UTIL_LIST)
16 | }
17 |
18 | }
19 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/inspections/groovyism/AssignCollectionUniqueInspectionToolSpec.groovy:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.groovyism
2 |
3 | import com.intellij.codeInspection.LocalInspectionTool
4 | import groovy.transform.CompileStatic
5 | import org.codenarc.idea.testing.InspectionSpec
6 |
7 | @CompileStatic
8 | class AssignCollectionUniqueInspectionToolSpec extends InspectionSpec {
9 |
10 | @Override
11 | protected LocalInspectionTool createInspection() {
12 | return new AssignCollectionUniqueInspectionTool()
13 | }
14 |
15 | @Override
16 | protected Iterable getClassesToInclude() {
17 | return Collections.singleton(JAVA_UTIL_LIST)
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/inspections/imports/NoWildcardImportsInspectionToolSpec.groovy:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.imports
2 |
3 | import com.intellij.codeInspection.LocalInspectionTool
4 | import groovy.transform.CompileDynamic
5 | import org.codenarc.idea.testing.InspectionSpec
6 |
7 | @CompileDynamic
8 | class NoWildcardImportsInspectionToolSpec extends InspectionSpec {
9 |
10 | @Override
11 | protected LocalInspectionTool createInspection() {
12 | return new NoWildcardImportsInspectionTool()
13 | }
14 |
15 | @Override
16 | protected Iterable getClassesToInclude() {
17 | return [COM_EXAMPLE_ONE, COM_EXAMPLE_TWO, ORG_EXAMPLE_THREE, ORG_EXAMPLE_FOUR]
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/inspections/imports/UnusedImportInspectionToolSpec.groovy:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.imports
2 |
3 | import com.intellij.codeInsight.intention.IntentionAction
4 | import com.intellij.codeInspection.LocalInspectionTool
5 | import groovy.transform.CompileDynamic
6 | import org.codenarc.idea.testing.InspectionSpec
7 | import org.jetbrains.plugins.groovy.codeInspection.GroovyOptimizeImportsFix
8 |
9 | @CompileDynamic
10 | class UnusedImportInspectionToolSpec extends InspectionSpec {
11 |
12 | @Override
13 | protected LocalInspectionTool createInspection() {
14 | return new UnusedImportInspectionTool()
15 | }
16 |
17 | @Override
18 | protected Iterable getClassesToInclude() {
19 | return [JAVA_LANG_STRING, JAVA_UTIL_LIST]
20 | }
21 |
22 | @Override
23 | @SuppressWarnings(['ImplicitClosureParameter', 'Instanceof'])
24 | protected List getRelevantFixes() {
25 | return super.relevantFixes.findAll { !(it instanceof GroovyOptimizeImportsFix) }
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/inspections/logging/PrintlnInspectionToolSpec.groovy:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.logging
2 |
3 | import com.intellij.codeInspection.LocalInspectionTool
4 | import org.codenarc.idea.testing.InspectionSpec
5 |
6 | class PrintlnInspectionToolSpec extends InspectionSpec {
7 |
8 | @Override
9 | protected LocalInspectionTool createInspection() {
10 | return new PrintlnInspectionTool()
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/inspections/unnecessary/UnnecessaryDotClassInspectionToolSpec.groovy:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.unnecessary
2 |
3 | import com.intellij.codeInspection.LocalInspectionTool
4 | import groovy.transform.CompileDynamic
5 | import org.codenarc.idea.testing.InspectionSpec
6 |
7 | @CompileDynamic
8 | class UnnecessaryDotClassInspectionToolSpec extends InspectionSpec {
9 |
10 | @Override
11 | protected LocalInspectionTool createInspection() {
12 | return new UnnecessaryDotClassInspectionTool()
13 | }
14 |
15 | @Override
16 | protected Iterable getClassesToInclude() {
17 | return [
18 | JAVA_LANG_STRING
19 | ]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/inspections/unnecessary/UnnecessaryGStringInspectionToolSpec.groovy:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.inspections.unnecessary
2 |
3 | import com.intellij.codeInspection.LocalInspectionTool
4 | import groovy.transform.CompileDynamic
5 | import org.codenarc.idea.testing.InspectionSpec
6 |
7 | @CompileDynamic
8 | class UnnecessaryGStringInspectionToolSpec extends InspectionSpec {
9 |
10 | @Override
11 | protected LocalInspectionTool createInspection() {
12 | return new UnnecessaryGStringInspectionTool()
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/testing/CompoundTestLibrary.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.testing;
2 |
3 | import com.intellij.openapi.module.Module;
4 | import com.intellij.openapi.roots.ModifiableRootModel;
5 | import org.jetbrains.annotations.NotNull;
6 |
7 | public final class CompoundTestLibrary implements TestLibrary {
8 |
9 | private final TestLibrary[] myLibraries;
10 |
11 | public CompoundTestLibrary(TestLibrary... libraries) {
12 | assert libraries.length > 0;
13 | myLibraries = libraries;
14 | }
15 |
16 | @Override
17 | public void addTo(@NotNull Module module, @NotNull ModifiableRootModel model) {
18 | for (TestLibrary library : myLibraries) {
19 | library.addTo(module, model);
20 | }
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/testing/LibraryLightProjectDescriptor.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.testing;
2 |
3 | import com.intellij.openapi.module.Module;
4 | import com.intellij.openapi.roots.ContentEntry;
5 | import com.intellij.openapi.roots.ModifiableRootModel;
6 | import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor;
7 | import org.jetbrains.annotations.NotNull;
8 |
9 | public class LibraryLightProjectDescriptor extends DefaultLightProjectDescriptor {
10 |
11 | private final TestLibrary myLibrary;
12 |
13 | public LibraryLightProjectDescriptor(TestLibrary library) {
14 | myLibrary = library;
15 | }
16 |
17 | @Override
18 | public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) {
19 | super.configureModule(module, model, contentEntry);
20 | myLibrary.addTo(module, model);
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/testing/TestLibrary.java:
--------------------------------------------------------------------------------
1 | package org.codenarc.idea.testing;
2 |
3 | import com.intellij.openapi.module.Module;
4 | import com.intellij.openapi.roots.ModifiableRootModel;
5 | import com.intellij.openapi.roots.ModuleRootModificationUtil;
6 | import org.jetbrains.annotations.NotNull;
7 |
8 | public interface TestLibrary {
9 |
10 | default void addTo(@NotNull Module module) {
11 | ModuleRootModificationUtil.updateModel(module, model -> addTo(module, model));
12 | }
13 |
14 | void addTo(@NotNull Module module, @NotNull ModifiableRootModel model);
15 |
16 | @NotNull
17 | default TestLibrary plus(@NotNull TestLibrary library) {
18 | return new CompoundTestLibrary(this, library);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/test/groovy/org/codenarc/idea/testing/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Contains classes from https://github.com/JetBrains/intellij-community/tree/master/plugins/groovy/test/org/jetbrains/plugins/groovy
3 | */
4 | package org.codenarc.idea.testing;
5 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/basic/AssignmentInConditionalInspectionToolSpec/before.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
5 | * are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class AssignmentInConditionalInspectionToolSpecSnippet {
8 |
9 | void doSomething() {
10 | String a = 'hello'
11 | String b = 'world'
12 |
13 | while (a = 'hola') {
14 | a = 'hola'
15 | }
16 |
17 | while (b = 'svete') {
18 | b = 'svete'
19 | }
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/basic/AssignmentInConditionalInspectionToolSpec/fixed.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
5 | * are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class AssignmentInConditionalInspectionToolSpecSnippet {
8 |
9 | void doSomething() {
10 | String a = 'hello'
11 | String b = 'world'
12 |
13 | while (a == 'hola') {
14 | a = 'hola'
15 | }
16 |
17 | while (b == 'svete') {
18 | b = 'svete'
19 | }
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/convention/ImplicitReturnStatementInspectionToolSpec/before.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
5 | * are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class ImplicitReturnStatementInspectionToolSpecSnippet {
8 |
9 | String doSomething() {
10 | 'something'
11 | }
12 |
13 | String doStuff() {
14 | 'stuff'
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/convention/ImplicitReturnStatementInspectionToolSpec/fixed.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
5 | * are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class ImplicitReturnStatementInspectionToolSpecSnippet {
8 |
9 | String doSomething() {
10 | return 'something'
11 | }
12 |
13 | String doStuff() {
14 | return 'stuff'
15 | }
16 |
17 | }
18 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/groovyism/AssignCollectionSortInspectionToolSpec/before.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. before.txt
and fixed.txt
5 | * files are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class AssignCollectionSortInspectionToolSpecSnippet {
8 |
9 | void doSomething() {
10 | List one = ['foo', 'bar']
11 | List sorted1 = one.sort()
12 | List sorted2 = one.sort()
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/groovyism/AssignCollectionSortInspectionToolSpec/fixed.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. before.txt
and fixed.txt
5 | * files are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class AssignCollectionSortInspectionToolSpecSnippet {
8 |
9 | void doSomething() {
10 | List one = ['foo', 'bar']
11 | List sorted1 = one.sort(false)
12 | List sorted2 = one.sort(false)
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/groovyism/AssignCollectionUniqueInspectionToolSpec/before.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. before.txt
and fixed.txt
5 | * files are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class AssignCollectionUniqueInspectionToolSpecSnippet {
8 |
9 | void doSomething() {
10 | List one = ['foo', 'bar']
11 | List unique1 = one.unique()
12 | List unique2 = one.unique()
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/groovyism/AssignCollectionUniqueInspectionToolSpec/fixed.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. before.txt
and fixed.txt
5 | * files are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class AssignCollectionUniqueInspectionToolSpecSnippet {
8 |
9 | void doSomething() {
10 | List one = ['foo', 'bar']
11 | List unique1 = one.unique(false)
12 | List unique2 = one.unique(false)
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/imports/NoWildcardImportsInspectionToolSpec/before.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | import com.example.*
4 | import org.example.*
5 |
6 | /**
7 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
8 | * are only generated when missing so you need to delete these files if you want to regenerated them.
9 | */
10 | class NoWildcardImportsInspectionToolSpecSnippet {
11 |
12 | void doSomething() {
13 | def one = new One()
14 | def two = new Two()
15 | def three = new Three()
16 | def four = new Four()
17 | }
18 |
19 | }
20 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/imports/NoWildcardImportsInspectionToolSpec/fixed.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | import com.example.One
4 | import com.example.Two
5 | import org.example.Four
6 | import org.example.Three
7 |
8 | /**
9 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
10 | * are only generated when missing so you need to delete these files if you want to regenerated them.
11 | */
12 | class NoWildcardImportsInspectionToolSpecSnippet {
13 |
14 | void doSomething() {
15 | def one = new One()
16 | def two = new Two()
17 | def three = new Three()
18 | def four = new Four()
19 | }
20 |
21 | }
22 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/imports/UnusedImportInspectionToolSpec/before.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | import java.lang.String
4 | import java.util.List
5 |
6 | /**
7 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
8 | * are only generated when missing so you need to delete these files if you want to regenerated them.
9 | */
10 | class UnusedImportInspectionToolSpecSnippet {
11 |
12 | void doSomething() { }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/imports/UnusedImportInspectionToolSpec/fixed.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 |
4 | /**
5 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
6 | * are only generated when missing so you need to delete these files if you want to regenerated them.
7 | */
8 | class UnusedImportInspectionToolSpecSnippet {
9 |
10 | void doSomething() { }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/logging/PrintlnInspectionToolSpec/before.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | class Snippet {
4 |
5 | void someMethod() {
6 | println 'Hello'
7 | println 'World'
8 | }
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/logging/PrintlnInspectionToolSpec/fixed.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | import groovy.util.logging.Slf4j
4 |
5 | @Slf4j
6 | class Snippet {
7 |
8 | void someMethod() {
9 | log.info 'Hello'
10 | log.info 'World'
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/unnecessary/UnnecessaryDotClassInspectionToolSpec/before.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
5 | * are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class UnnecessaryDotClassInspectionToolSpecSnippet {
8 |
9 | void doSomething() {
10 | def one = String.class
11 | def two = String.class
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/unnecessary/UnnecessaryDotClassInspectionToolSpec/fixed.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | /**
4 | * Class to demonstrate code violations. Files before.txt
and fixed.txt
5 | * are only generated when missing so you need to delete these files if you want to regenerated them.
6 | */
7 | class UnnecessaryDotClassInspectionToolSpecSnippet {
8 |
9 | void doSomething() {
10 | def one = String
11 | def two = String
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/unnecessary/UnnecessaryGStringInspectionToolSpec/before.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | class UnnecessaryGString {
4 |
5 | void someMethod() {
6 | def something = "Should be single quote"
7 | def other = "Should be single quote as well"
8 | }
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/src/test/resources/org/codenarc/idea/inspections/unnecessary/UnnecessaryGStringInspectionToolSpec/fixed.txt:
--------------------------------------------------------------------------------
1 | package rules
2 |
3 | class UnnecessaryGString {
4 |
5 | void someMethod() {
6 | def something = 'Should be single quote'
7 | def other = 'Should be single quote as well'
8 | }
9 |
10 | }
11 |
--------------------------------------------------------------------------------
/static/images/add-repository-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melix/codenarc-idea/567cb81cae1495a3d008fc4e4ab543c22ce6b204/static/images/add-repository-1.png
--------------------------------------------------------------------------------
/static/images/add-repository-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/melix/codenarc-idea/567cb81cae1495a3d008fc4e4ab543c22ce6b204/static/images/add-repository-2.png
--------------------------------------------------------------------------------