Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npm-groovy-lint

Package Overview
Dependencies
Maintainers
1
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-groovy-lint - npm Package Compare versions

Comparing version 9.4.0 to 9.4.1

lib/rules/MethodReturnTypeRequired.js

7

CHANGELOG.md

@@ -7,2 +7,9 @@ # Changelog

## [9.4.1] 2022-01-22
- Upgrade node-sarif-builder to 2.0.1 and send npm-groovy-lint version in SARIF logs
- New range detection for rules:
- MethodReturnTypeRequired
- UnusedImport
## [9.4.0] 2022-01-11

@@ -9,0 +16,0 @@

788

lib/.groovylintrc-all.json
{
"rules": {
"basic.AssertWithinFinallyBlock": {},
"basic.AssignmentInConditional": {},
"basic.BigDecimalInstantiation": {},
"basic.BitwiseOperatorInConditional": {},
"basic.BooleanGetBoolean": {},
"basic.BrokenNullCheck": {},
"basic.BrokenOddnessCheck": {},
"basic.ClassForName": {},
"basic.ComparisonOfTwoConstants": {},
"basic.ComparisonWithSelf": {},
"basic.ConstantAssertExpression": {},
"basic.ConstantIfExpression": {},
"basic.ConstantTernaryExpression": {},
"basic.DeadCode": {},
"basic.DoubleNegative": {},
"basic.DuplicateCaseStatement": {},
"basic.DuplicateMapKey": {},
"basic.DuplicateSetValue": {},
"basic.EmptyCatchBlock": {},
"basic.EmptyClass": {},
"basic.EmptyElseBlock": {},
"basic.EmptyFinallyBlock": {},
"basic.EmptyForStatement": {},
"basic.EmptyIfStatement": {},
"basic.EmptyInstanceInitializer": {},
"basic.EmptyMethod": {},
"basic.EmptyStaticInitializer": {},
"basic.EmptySwitchStatement": {},
"basic.EmptySynchronizedStatement": {},
"basic.EmptyTryBlock": {},
"basic.EmptyWhileStatement": {},
"basic.EqualsAndHashCode": {},
"basic.EqualsOverloaded": {},
"basic.ExplicitGarbageCollection": {},
"basic.ForLoopShouldBeWhileLoop": {},
"basic.HardCodedWindowsFileSeparator": {},
"basic.HardCodedWindowsRootDirectory": {},
"basic.IntegerGetInteger": {},
"basic.MultipleUnaryOperators": {},
"basic.ParameterAssignmentInFilterClosure": {},
"basic.RandomDoubleCoercedToZero": {},
"basic.RemoveAllOnSelf": {},
"basic.ReturnFromFinallyBlock": {},
"basic.ThrowExceptionFromFinallyBlock": {},
"braces.ElseBlockBraces": {},
"braces.ForStatementBraces": {},
"braces.IfStatementBraces": {},
"braces.WhileStatementBraces": {},
"comments.ClassJavadoc": {},
"comments.JavadocConsecutiveEmptyLines": {},
"comments.JavadocEmptyAuthorTag": {},
"comments.JavadocEmptyExceptionTag": {},
"comments.JavadocEmptyFirstLine": {},
"comments.JavadocEmptyLastLine": {},
"comments.JavadocEmptyParamTag": {},
"comments.JavadocEmptyReturnTag": {},
"comments.JavadocEmptySeeTag": {},
"comments.JavadocEmptySinceTag": {},
"comments.JavadocEmptyThrowsTag": {},
"comments.JavadocEmptyVersionTag": {},
"comments.JavadocMissingExceptionDescription": {},
"comments.JavadocMissingParamDescription": {},
"comments.JavadocMissingThrowsDescription": {},
"concurrency.BusyWait": {},
"concurrency.DoubleCheckedLocking": {},
"concurrency.InconsistentPropertyLocking": {},
"concurrency.InconsistentPropertySynchronization": {},
"concurrency.NestedSynchronization": {},
"concurrency.StaticCalendarField": {},
"concurrency.StaticConnection": {},
"concurrency.StaticDateFormatField": {},
"concurrency.StaticMatcherField": {},
"concurrency.StaticSimpleDateFormatField": {},
"concurrency.SynchronizedMethod": {},
"concurrency.SynchronizedOnBoxedPrimitive": {},
"concurrency.SynchronizedOnGetClass": {},
"concurrency.SynchronizedOnReentrantLock": {},
"concurrency.SynchronizedOnString": {},
"concurrency.SynchronizedOnThis": {},
"concurrency.SynchronizedReadObjectMethod": {},
"concurrency.SystemRunFinalizersOnExit": {},
"concurrency.ThisReferenceEscapesConstructor": {},
"concurrency.ThreadGroup": {},
"concurrency.ThreadLocalNotStaticFinal": {},
"concurrency.ThreadYield": {},
"concurrency.UseOfNotifyMethod": {},
"concurrency.VolatileArrayField": {},
"concurrency.VolatileLongOrDoubleField": {},
"concurrency.WaitOutsideOfWhileLoop": {},
"convention.CompileStatic": {},
"convention.ConfusingTernary": {},
"convention.CouldBeElvis": {},
"convention.CouldBeSwitchStatement": {},
"convention.FieldTypeRequired": {},
"convention.HashtableIsObsolete": {},
"convention.IfStatementCouldBeTernary": {},
"convention.ImplicitClosureParameter": {},
"convention.ImplicitReturnStatement": {},
"convention.InvertedCondition": {},
"convention.InvertedIfElse": {},
"convention.LongLiteralWithLowerCaseL": {},
"convention.MethodParameterTypeRequired": {},
"convention.MethodReturnTypeRequired": {},
"convention.NoDef": {},
"convention.NoDouble": {},
"convention.NoFloat": {},
"convention.NoJavaUtilDate": {},
"convention.NoTabCharacter": {},
"convention.ParameterReassignment": {},
"convention.PublicMethodsBeforeNonPublicMethods": {},
"convention.StaticFieldsBeforeInstanceFields": {},
"convention.StaticMethodsBeforeInstanceMethods": {},
"convention.TernaryCouldBeElvis": {},
"convention.TrailingComma": {},
"convention.VariableTypeRequired": {},
"convention.VectorIsObsolete": {},
"design.AbstractClassWithPublicConstructor": {},
"design.AbstractClassWithoutAbstractMethod": {},
"design.AssignmentToStaticFieldFromInstanceMethod": {},
"design.BooleanMethodReturnsNull": {},
"design.BuilderMethodWithSideEffects": {},
"design.CloneableWithoutClone": {},
"design.CloseWithoutCloseable": {},
"design.CompareToWithoutComparable": {},
"design.ConstantsOnlyInterface": {},
"design.EmptyMethodInAbstractClass": {},
"design.FinalClassWithProtectedMember": {},
"design.ImplementationAsType": {},
"design.Instanceof": {},
"design.LocaleSetDefault": {},
"design.NestedForLoop": {},
"design.OptionalCollectionReturnType": {},
"design.OptionalField": {},
"design.OptionalMethodParameter": {},
"design.PrivateFieldCouldBeFinal": {},
"design.PublicInstanceField": {},
"design.ReturnsNullInsteadOfEmptyArray": {},
"design.ReturnsNullInsteadOfEmptyCollection": {},
"design.SimpleDateFormatMissingLocale": {},
"design.StatelessSingleton": {},
"design.ToStringReturnsNull": {},
"dry.DuplicateListLiteral": {},
"dry.DuplicateMapLiteral": {},
"dry.DuplicateNumberLiteral": {},
"dry.DuplicateStringLiteral": {},
"enhanced.CloneWithoutCloneable": {},
"enhanced.JUnitAssertEqualsConstantActualValue": {},
"enhanced.MissingOverrideAnnotation": {},
"enhanced.UnsafeImplementationAsMap": {},
"exceptions.CatchArrayIndexOutOfBoundsException": {},
"exceptions.CatchError": {},
"exceptions.CatchException": {},
"exceptions.CatchIllegalMonitorStateException": {},
"exceptions.CatchIndexOutOfBoundsException": {},
"exceptions.CatchNullPointerException": {},
"exceptions.CatchRuntimeException": {},
"exceptions.CatchThrowable": {},
"exceptions.ConfusingClassNamedException": {},
"exceptions.ExceptionExtendsError": {},
"exceptions.ExceptionExtendsThrowable": {},
"exceptions.ExceptionNotThrown": {},
"exceptions.MissingNewInThrowStatement": {},
"exceptions.ReturnNullFromCatchBlock": {},
"exceptions.SwallowThreadDeath": {},
"exceptions.ThrowError": {},
"exceptions.ThrowException": {},
"exceptions.ThrowNullPointerException": {},
"exceptions.ThrowRuntimeException": {},
"exceptions.ThrowThrowable": {},
"formatting.BlankLineBeforePackage": {},
"formatting.BlockEndsWithBlankLine": {},
"formatting.BlockStartsWithBlankLine": {},
"formatting.BracesForClass": {},
"formatting.BracesForForLoop": {},
"formatting.BracesForIfElse": {},
"formatting.BracesForMethod": {},
"formatting.BracesForTryCatchFinally": {},
"formatting.ClassEndsWithBlankLine": {},
"formatting.ClassStartsWithBlankLine": {},
"formatting.ClosureStatementOnOpeningLineOfMultipleLineClosure": {},
"formatting.ConsecutiveBlankLines": {},
"formatting.FileEndsWithoutNewline": {},
"formatting.Indentation": {},
"formatting.LineLength": {},
"formatting.MissingBlankLineAfterImports": {},
"formatting.MissingBlankLineAfterPackage": {},
"formatting.MissingBlankLineBeforeAnnotatedField": {},
"formatting.SpaceAfterCatch": {},
"formatting.SpaceAfterClosingBrace": {},
"formatting.SpaceAfterComma": {},
"formatting.SpaceAfterFor": {},
"formatting.SpaceAfterIf": {},
"formatting.SpaceAfterMethodCallName": {},
"formatting.SpaceAfterMethodDeclarationName": {},
"formatting.SpaceAfterNotOperator": {},
"formatting.SpaceAfterOpeningBrace": {},
"formatting.SpaceAfterSemicolon": {},
"formatting.SpaceAfterSwitch": {},
"formatting.SpaceAfterWhile": {},
"formatting.SpaceAroundClosureArrow": {},
"formatting.SpaceAroundMapEntryColon": {},
"formatting.SpaceAroundOperator": {},
"formatting.SpaceBeforeClosingBrace": {},
"formatting.SpaceBeforeOpeningBrace": {},
"formatting.SpaceInsideParentheses": {},
"formatting.TrailingWhitespace": {},
"generic.IllegalClassMember": {},
"generic.IllegalClassReference": {},
"generic.IllegalPackageReference": {},
"generic.IllegalRegex": {},
"generic.IllegalString": {},
"generic.IllegalSubclass": {},
"generic.RequiredRegex": {},
"generic.RequiredString": {},
"generic.StatelessClass": {},
"grails.GrailsDomainGormMethods": {},
"grails.GrailsDomainHasEquals": {},
"grails.GrailsDomainHasToString": {},
"grails.GrailsDomainReservedSqlKeywordName": {},
"grails.GrailsDomainStringPropertyMaxSize": {},
"grails.GrailsDomainWithServiceReference": {},
"grails.GrailsDuplicateConstraint": {},
"grails.GrailsDuplicateMapping": {},
"grails.GrailsMassAssignment": {},
"grails.GrailsPublicControllerMethod": {},
"grails.GrailsServletContextReference": {},
"grails.GrailsStatelessService": {},
"groovyism.AssignCollectionSort": {},
"groovyism.AssignCollectionUnique": {},
"groovyism.ClosureAsLastMethodParameter": {},
"groovyism.CollectAllIsDeprecated": {},
"groovyism.ConfusingMultipleReturns": {},
"groovyism.ExplicitArrayListInstantiation": {},
"groovyism.ExplicitCallToAndMethod": {},
"groovyism.ExplicitCallToCompareToMethod": {},
"groovyism.ExplicitCallToDivMethod": {},
"groovyism.ExplicitCallToEqualsMethod": {},
"groovyism.ExplicitCallToGetAtMethod": {},
"groovyism.ExplicitCallToLeftShiftMethod": {},
"groovyism.ExplicitCallToMinusMethod": {},
"groovyism.ExplicitCallToModMethod": {},
"groovyism.ExplicitCallToMultiplyMethod": {},
"groovyism.ExplicitCallToOrMethod": {},
"groovyism.ExplicitCallToPlusMethod": {},
"groovyism.ExplicitCallToPowerMethod": {},
"groovyism.ExplicitCallToPutAtMethod": {},
"groovyism.ExplicitCallToRightShiftMethod": {},
"groovyism.ExplicitCallToXorMethod": {},
"groovyism.ExplicitHashMapInstantiation": {},
"groovyism.ExplicitHashSetInstantiation": {},
"groovyism.ExplicitLinkedHashMapInstantiation": {},
"groovyism.ExplicitLinkedListInstantiation": {},
"groovyism.ExplicitStackInstantiation": {},
"groovyism.ExplicitTreeSetInstantiation": {},
"groovyism.GStringAsMapKey": {},
"groovyism.GStringExpressionWithinString": {},
"groovyism.GetterMethodCouldBeProperty": {},
"groovyism.GroovyLangImmutable": {},
"groovyism.UseCollectMany": {},
"groovyism.UseCollectNested": {},
"imports.DuplicateImport": {},
"imports.ImportFromSamePackage": {},
"imports.ImportFromSunPackages": {},
"imports.MisorderedStaticImports": {},
"imports.NoWildcardImports": {},
"imports.UnnecessaryGroovyImport": {},
"imports.UnusedImport": {},
"jdbc.DirectConnectionManagement": {},
"jdbc.JdbcConnectionReference": {},
"jdbc.JdbcResultSetReference": {},
"jdbc.JdbcStatementReference": {},
"junit.ChainedTest": {},
"junit.CoupledTestCase": {},
"junit.JUnitAssertAlwaysFails": {},
"junit.JUnitAssertAlwaysSucceeds": {},
"junit.JUnitFailWithoutMessage": {},
"junit.JUnitLostTest": {},
"junit.JUnitPublicField": {},
"junit.JUnitPublicNonTestMethod": {},
"junit.JUnitPublicProperty": {},
"junit.JUnitSetUpCallsSuper": {},
"junit.JUnitStyleAssertions": {},
"junit.JUnitTearDownCallsSuper": {},
"junit.JUnitTestMethodWithoutAssert": {},
"junit.JUnitUnnecessarySetUp": {},
"junit.JUnitUnnecessaryTearDown": {},
"junit.JUnitUnnecessaryThrowsException": {},
"junit.SpockIgnoreRestUsed": {},
"junit.UnnecessaryFail": {},
"junit.UseAssertEqualsInsteadOfAssertTrue": {},
"junit.UseAssertFalseInsteadOfNegation": {},
"junit.UseAssertNullInsteadOfAssertEquals": {},
"junit.UseAssertSameInsteadOfAssertTrue": {},
"junit.UseAssertTrueInsteadOfAssertEquals": {},
"junit.UseAssertTrueInsteadOfNegation": {},
"logging.LoggerForDifferentClass": {},
"logging.LoggerWithWrongModifiers": {},
"logging.LoggingSwallowsStacktrace": {},
"logging.MultipleLoggers": {},
"logging.PrintStackTrace": {},
"logging.Println": {},
"logging.SystemErrPrint": {},
"logging.SystemOutPrint": {},
"naming.AbstractClassName": {},
"naming.ClassName": {},
"naming.ClassNameSameAsFilename": {},
"naming.ClassNameSameAsSuperclass": {},
"naming.ConfusingMethodName": {},
"naming.FactoryMethodName": {},
"naming.FieldName": {},
"naming.InterfaceName": {},
"naming.InterfaceNameSameAsSuperInterface": {},
"naming.MethodName": {},
"naming.ObjectOverrideMisspelledMethodName": {},
"naming.PackageName": {},
"naming.PackageNameMatchesFilePath": {},
"naming.ParameterName": {},
"naming.PropertyName": {},
"naming.VariableName": {},
"security.FileCreateTempFile": {},
"security.InsecureRandom": {},
"security.JavaIoPackageAccess": {},
"security.NonFinalPublicField": {},
"security.NonFinalSubclassOfSensitiveInterface": {},
"security.ObjectFinalize": {},
"security.PublicFinalizeMethod": {},
"security.SystemExit": {},
"security.UnsafeArrayDeclaration": {},
"serialization.EnumCustomSerializationIgnored": {},
"serialization.SerialPersistentFields": {},
"serialization.SerialVersionUID": {},
"serialization.SerializableClassMustDefineSerialVersionUID": {},
"size.ClassSize": {},
"size.MethodCount": {},
"size.MethodSize": {},
"size.NestedBlockDepth": {},
"size.ParameterCount": {},
"unnecessary.AddEmptyString": {},
"unnecessary.ConsecutiveLiteralAppends": {},
"unnecessary.ConsecutiveStringConcatenation": {},
"unnecessary.UnnecessaryBigDecimalInstantiation": {},
"unnecessary.UnnecessaryBigIntegerInstantiation": {},
"unnecessary.UnnecessaryBooleanExpression": {},
"unnecessary.UnnecessaryBooleanInstantiation": {},
"unnecessary.UnnecessaryCallForLastElement": {},
"unnecessary.UnnecessaryCallToSubstring": {},
"unnecessary.UnnecessaryCast": {},
"unnecessary.UnnecessaryCatchBlock": {},
"unnecessary.UnnecessaryCollectCall": {},
"unnecessary.UnnecessaryCollectionCall": {},
"unnecessary.UnnecessaryConstructor": {},
"unnecessary.UnnecessaryDefInFieldDeclaration": {},
"unnecessary.UnnecessaryDefInMethodDeclaration": {},
"unnecessary.UnnecessaryDefInVariableDeclaration": {},
"unnecessary.UnnecessaryDotClass": {},
"unnecessary.UnnecessaryDoubleInstantiation": {},
"unnecessary.UnnecessaryElseStatement": {},
"unnecessary.UnnecessaryFinalOnPrivateMethod": {},
"unnecessary.UnnecessaryFloatInstantiation": {},
"unnecessary.UnnecessaryGString": {},
"unnecessary.UnnecessaryGetter": {},
"unnecessary.UnnecessaryIfStatement": {},
"unnecessary.UnnecessaryInstanceOfCheck": {},
"unnecessary.UnnecessaryInstantiationToGetClass": {},
"unnecessary.UnnecessaryIntegerInstantiation": {},
"unnecessary.UnnecessaryLongInstantiation": {},
"unnecessary.UnnecessaryModOne": {},
"unnecessary.UnnecessaryNullCheck": {},
"unnecessary.UnnecessaryNullCheckBeforeInstanceOf": {},
"unnecessary.UnnecessaryObjectReferences": {},
"unnecessary.UnnecessaryOverridingMethod": {},
"unnecessary.UnnecessaryPackageReference": {},
"unnecessary.UnnecessaryParenthesesForMethodCallWithClosure": {},
"unnecessary.UnnecessaryPublicModifier": {},
"unnecessary.UnnecessaryReturnKeyword": {},
"unnecessary.UnnecessarySafeNavigationOperator": {},
"unnecessary.UnnecessarySelfAssignment": {},
"unnecessary.UnnecessarySemicolon": {},
"unnecessary.UnnecessarySetter": {},
"unnecessary.UnnecessaryStringInstantiation": {},
"unnecessary.UnnecessarySubstring": {},
"unnecessary.UnnecessaryTernaryExpression": {},
"unnecessary.UnnecessaryToString": {},
"unnecessary.UnnecessaryTransientModifier": {},
"unused.UnusedArray": {},
"unused.UnusedMethodParameter": {},
"unused.UnusedObject": {},
"unused.UnusedPrivateField": {},
"unused.UnusedPrivateMethod": {},
"unused.UnusedPrivateMethodParameter": {},
"unused.UnusedVariable": {}
}
}
"rules": {
"basic.AssertWithinFinallyBlock": {},
"basic.AssignmentInConditional": {},
"basic.BigDecimalInstantiation": {},
"basic.BitwiseOperatorInConditional": {},
"basic.BooleanGetBoolean": {},
"basic.BrokenNullCheck": {},
"basic.BrokenOddnessCheck": {},
"basic.ClassForName": {},
"basic.ComparisonOfTwoConstants": {},
"basic.ComparisonWithSelf": {},
"basic.ConstantAssertExpression": {},
"basic.ConstantIfExpression": {},
"basic.ConstantTernaryExpression": {},
"basic.DeadCode": {},
"basic.DoubleNegative": {},
"basic.DuplicateCaseStatement": {},
"basic.DuplicateMapKey": {},
"basic.DuplicateSetValue": {},
"basic.EmptyCatchBlock": {},
"basic.EmptyClass": {},
"basic.EmptyElseBlock": {},
"basic.EmptyFinallyBlock": {},
"basic.EmptyForStatement": {},
"basic.EmptyIfStatement": {},
"basic.EmptyInstanceInitializer": {},
"basic.EmptyMethod": {},
"basic.EmptyStaticInitializer": {},
"basic.EmptySwitchStatement": {},
"basic.EmptySynchronizedStatement": {},
"basic.EmptyTryBlock": {},
"basic.EmptyWhileStatement": {},
"basic.EqualsAndHashCode": {},
"basic.EqualsOverloaded": {},
"basic.ExplicitGarbageCollection": {},
"basic.ForLoopShouldBeWhileLoop": {},
"basic.HardCodedWindowsFileSeparator": {},
"basic.HardCodedWindowsRootDirectory": {},
"basic.IntegerGetInteger": {},
"basic.MultipleUnaryOperators": {},
"basic.ParameterAssignmentInFilterClosure": {},
"basic.RandomDoubleCoercedToZero": {},
"basic.RemoveAllOnSelf": {},
"basic.ReturnFromFinallyBlock": {},
"basic.ThrowExceptionFromFinallyBlock": {},
"braces.ElseBlockBraces": {},
"braces.ForStatementBraces": {},
"braces.IfStatementBraces": {},
"braces.WhileStatementBraces": {},
"comments.ClassJavadoc": {},
"comments.JavadocConsecutiveEmptyLines": {},
"comments.JavadocEmptyAuthorTag": {},
"comments.JavadocEmptyExceptionTag": {},
"comments.JavadocEmptyFirstLine": {},
"comments.JavadocEmptyLastLine": {},
"comments.JavadocEmptyParamTag": {},
"comments.JavadocEmptyReturnTag": {},
"comments.JavadocEmptySeeTag": {},
"comments.JavadocEmptySinceTag": {},
"comments.JavadocEmptyThrowsTag": {},
"comments.JavadocEmptyVersionTag": {},
"comments.JavadocMissingExceptionDescription": {},
"comments.JavadocMissingParamDescription": {},
"comments.JavadocMissingThrowsDescription": {},
"concurrency.BusyWait": {},
"concurrency.DoubleCheckedLocking": {},
"concurrency.InconsistentPropertyLocking": {},
"concurrency.InconsistentPropertySynchronization": {},
"concurrency.NestedSynchronization": {},
"concurrency.StaticCalendarField": {},
"concurrency.StaticConnection": {},
"concurrency.StaticDateFormatField": {},
"concurrency.StaticMatcherField": {},
"concurrency.StaticSimpleDateFormatField": {},
"concurrency.SynchronizedMethod": {},
"concurrency.SynchronizedOnBoxedPrimitive": {},
"concurrency.SynchronizedOnGetClass": {},
"concurrency.SynchronizedOnReentrantLock": {},
"concurrency.SynchronizedOnString": {},
"concurrency.SynchronizedOnThis": {},
"concurrency.SynchronizedReadObjectMethod": {},
"concurrency.SystemRunFinalizersOnExit": {},
"concurrency.ThisReferenceEscapesConstructor": {},
"concurrency.ThreadGroup": {},
"concurrency.ThreadLocalNotStaticFinal": {},
"concurrency.ThreadYield": {},
"concurrency.UseOfNotifyMethod": {},
"concurrency.VolatileArrayField": {},
"concurrency.VolatileLongOrDoubleField": {},
"concurrency.WaitOutsideOfWhileLoop": {},
"convention.CompileStatic": {},
"convention.ConfusingTernary": {},
"convention.CouldBeElvis": {},
"convention.CouldBeSwitchStatement": {},
"convention.FieldTypeRequired": {},
"convention.HashtableIsObsolete": {},
"convention.IfStatementCouldBeTernary": {},
"convention.ImplicitClosureParameter": {},
"convention.ImplicitReturnStatement": {},
"convention.InvertedCondition": {},
"convention.InvertedIfElse": {},
"convention.LongLiteralWithLowerCaseL": {},
"convention.MethodParameterTypeRequired": {},
"convention.MethodReturnTypeRequired": {},
"convention.NoDef": {},
"convention.NoDouble": {},
"convention.NoFloat": {},
"convention.NoJavaUtilDate": {},
"convention.NoTabCharacter": {},
"convention.ParameterReassignment": {},
"convention.PublicMethodsBeforeNonPublicMethods": {},
"convention.StaticFieldsBeforeInstanceFields": {},
"convention.StaticMethodsBeforeInstanceMethods": {},
"convention.TernaryCouldBeElvis": {},
"convention.TrailingComma": {},
"convention.VariableTypeRequired": {},
"convention.VectorIsObsolete": {},
"design.AbstractClassWithPublicConstructor": {},
"design.AbstractClassWithoutAbstractMethod": {},
"design.AssignmentToStaticFieldFromInstanceMethod": {},
"design.BooleanMethodReturnsNull": {},
"design.BuilderMethodWithSideEffects": {},
"design.CloneableWithoutClone": {},
"design.CloseWithoutCloseable": {},
"design.CompareToWithoutComparable": {},
"design.ConstantsOnlyInterface": {},
"design.EmptyMethodInAbstractClass": {},
"design.FinalClassWithProtectedMember": {},
"design.ImplementationAsType": {},
"design.Instanceof": {},
"design.LocaleSetDefault": {},
"design.NestedForLoop": {},
"design.OptionalCollectionReturnType": {},
"design.OptionalField": {},
"design.OptionalMethodParameter": {},
"design.PrivateFieldCouldBeFinal": {},
"design.PublicInstanceField": {},
"design.ReturnsNullInsteadOfEmptyArray": {},
"design.ReturnsNullInsteadOfEmptyCollection": {},
"design.SimpleDateFormatMissingLocale": {},
"design.StatelessSingleton": {},
"design.ToStringReturnsNull": {},
"dry.DuplicateListLiteral": {},
"dry.DuplicateMapLiteral": {},
"dry.DuplicateNumberLiteral": {},
"dry.DuplicateStringLiteral": {},
"enhanced.CloneWithoutCloneable": {},
"enhanced.JUnitAssertEqualsConstantActualValue": {},
"enhanced.MissingOverrideAnnotation": {},
"enhanced.UnsafeImplementationAsMap": {},
"exceptions.CatchArrayIndexOutOfBoundsException": {},
"exceptions.CatchError": {},
"exceptions.CatchException": {},
"exceptions.CatchIllegalMonitorStateException": {},
"exceptions.CatchIndexOutOfBoundsException": {},
"exceptions.CatchNullPointerException": {},
"exceptions.CatchRuntimeException": {},
"exceptions.CatchThrowable": {},
"exceptions.ConfusingClassNamedException": {},
"exceptions.ExceptionExtendsError": {},
"exceptions.ExceptionExtendsThrowable": {},
"exceptions.ExceptionNotThrown": {},
"exceptions.MissingNewInThrowStatement": {},
"exceptions.ReturnNullFromCatchBlock": {},
"exceptions.SwallowThreadDeath": {},
"exceptions.ThrowError": {},
"exceptions.ThrowException": {},
"exceptions.ThrowNullPointerException": {},
"exceptions.ThrowRuntimeException": {},
"exceptions.ThrowThrowable": {},
"formatting.BlankLineBeforePackage": {},
"formatting.BlockEndsWithBlankLine": {},
"formatting.BlockStartsWithBlankLine": {},
"formatting.BracesForClass": {},
"formatting.BracesForForLoop": {},
"formatting.BracesForIfElse": {},
"formatting.BracesForMethod": {},
"formatting.BracesForTryCatchFinally": {},
"formatting.ClassEndsWithBlankLine": {},
"formatting.ClassStartsWithBlankLine": {},
"formatting.ClosureStatementOnOpeningLineOfMultipleLineClosure": {},
"formatting.ConsecutiveBlankLines": {},
"formatting.FileEndsWithoutNewline": {},
"formatting.Indentation": {},
"formatting.LineLength": {},
"formatting.MissingBlankLineAfterImports": {},
"formatting.MissingBlankLineAfterPackage": {},
"formatting.MissingBlankLineBeforeAnnotatedField": {},
"formatting.SpaceAfterCatch": {},
"formatting.SpaceAfterClosingBrace": {},
"formatting.SpaceAfterComma": {},
"formatting.SpaceAfterFor": {},
"formatting.SpaceAfterIf": {},
"formatting.SpaceAfterMethodCallName": {},
"formatting.SpaceAfterMethodDeclarationName": {},
"formatting.SpaceAfterNotOperator": {},
"formatting.SpaceAfterOpeningBrace": {},
"formatting.SpaceAfterSemicolon": {},
"formatting.SpaceAfterSwitch": {},
"formatting.SpaceAfterWhile": {},
"formatting.SpaceAroundClosureArrow": {},
"formatting.SpaceAroundMapEntryColon": {},
"formatting.SpaceAroundOperator": {},
"formatting.SpaceBeforeClosingBrace": {},
"formatting.SpaceBeforeOpeningBrace": {},
"formatting.SpaceInsideParentheses": {},
"formatting.TrailingWhitespace": {},
"generic.IllegalClassMember": {},
"generic.IllegalClassReference": {},
"generic.IllegalPackageReference": {},
"generic.IllegalRegex": {},
"generic.IllegalString": {},
"generic.IllegalSubclass": {},
"generic.RequiredRegex": {},
"generic.RequiredString": {},
"generic.StatelessClass": {},
"grails.GrailsDomainGormMethods": {},
"grails.GrailsDomainHasEquals": {},
"grails.GrailsDomainHasToString": {},
"grails.GrailsDomainReservedSqlKeywordName": {},
"grails.GrailsDomainStringPropertyMaxSize": {},
"grails.GrailsDomainWithServiceReference": {},
"grails.GrailsDuplicateConstraint": {},
"grails.GrailsDuplicateMapping": {},
"grails.GrailsMassAssignment": {},
"grails.GrailsPublicControllerMethod": {},
"grails.GrailsServletContextReference": {},
"grails.GrailsStatelessService": {},
"groovyism.AssignCollectionSort": {},
"groovyism.AssignCollectionUnique": {},
"groovyism.ClosureAsLastMethodParameter": {},
"groovyism.CollectAllIsDeprecated": {},
"groovyism.ConfusingMultipleReturns": {},
"groovyism.ExplicitArrayListInstantiation": {},
"groovyism.ExplicitCallToAndMethod": {},
"groovyism.ExplicitCallToCompareToMethod": {},
"groovyism.ExplicitCallToDivMethod": {},
"groovyism.ExplicitCallToEqualsMethod": {},
"groovyism.ExplicitCallToGetAtMethod": {},
"groovyism.ExplicitCallToLeftShiftMethod": {},
"groovyism.ExplicitCallToMinusMethod": {},
"groovyism.ExplicitCallToModMethod": {},
"groovyism.ExplicitCallToMultiplyMethod": {},
"groovyism.ExplicitCallToOrMethod": {},
"groovyism.ExplicitCallToPlusMethod": {},
"groovyism.ExplicitCallToPowerMethod": {},
"groovyism.ExplicitCallToPutAtMethod": {},
"groovyism.ExplicitCallToRightShiftMethod": {},
"groovyism.ExplicitCallToXorMethod": {},
"groovyism.ExplicitHashMapInstantiation": {},
"groovyism.ExplicitHashSetInstantiation": {},
"groovyism.ExplicitLinkedHashMapInstantiation": {},
"groovyism.ExplicitLinkedListInstantiation": {},
"groovyism.ExplicitStackInstantiation": {},
"groovyism.ExplicitTreeSetInstantiation": {},
"groovyism.GStringAsMapKey": {},
"groovyism.GStringExpressionWithinString": {},
"groovyism.GetterMethodCouldBeProperty": {},
"groovyism.GroovyLangImmutable": {},
"groovyism.UseCollectMany": {},
"groovyism.UseCollectNested": {},
"imports.DuplicateImport": {},
"imports.ImportFromSamePackage": {},
"imports.ImportFromSunPackages": {},
"imports.MisorderedStaticImports": {},
"imports.NoWildcardImports": {},
"imports.UnnecessaryGroovyImport": {},
"imports.UnusedImport": {},
"jdbc.DirectConnectionManagement": {},
"jdbc.JdbcConnectionReference": {},
"jdbc.JdbcResultSetReference": {},
"jdbc.JdbcStatementReference": {},
"junit.ChainedTest": {},
"junit.CoupledTestCase": {},
"junit.JUnitAssertAlwaysFails": {},
"junit.JUnitAssertAlwaysSucceeds": {},
"junit.JUnitFailWithoutMessage": {},
"junit.JUnitLostTest": {},
"junit.JUnitPublicField": {},
"junit.JUnitPublicNonTestMethod": {},
"junit.JUnitPublicProperty": {},
"junit.JUnitSetUpCallsSuper": {},
"junit.JUnitStyleAssertions": {},
"junit.JUnitTearDownCallsSuper": {},
"junit.JUnitTestMethodWithoutAssert": {},
"junit.JUnitUnnecessarySetUp": {},
"junit.JUnitUnnecessaryTearDown": {},
"junit.JUnitUnnecessaryThrowsException": {},
"junit.SpockIgnoreRestUsed": {},
"junit.UnnecessaryFail": {},
"junit.UseAssertEqualsInsteadOfAssertTrue": {},
"junit.UseAssertFalseInsteadOfNegation": {},
"junit.UseAssertNullInsteadOfAssertEquals": {},
"junit.UseAssertSameInsteadOfAssertTrue": {},
"junit.UseAssertTrueInsteadOfAssertEquals": {},
"junit.UseAssertTrueInsteadOfNegation": {},
"logging.LoggerForDifferentClass": {},
"logging.LoggerWithWrongModifiers": {},
"logging.LoggingSwallowsStacktrace": {},
"logging.MultipleLoggers": {},
"logging.PrintStackTrace": {},
"logging.Println": {},
"logging.SystemErrPrint": {},
"logging.SystemOutPrint": {},
"naming.AbstractClassName": {},
"naming.ClassName": {},
"naming.ClassNameSameAsFilename": {},
"naming.ClassNameSameAsSuperclass": {},
"naming.ConfusingMethodName": {},
"naming.FactoryMethodName": {},
"naming.FieldName": {},
"naming.InterfaceName": {},
"naming.InterfaceNameSameAsSuperInterface": {},
"naming.MethodName": {},
"naming.ObjectOverrideMisspelledMethodName": {},
"naming.PackageName": {},
"naming.PackageNameMatchesFilePath": {},
"naming.ParameterName": {},
"naming.PropertyName": {},
"naming.VariableName": {},
"security.FileCreateTempFile": {},
"security.InsecureRandom": {},
"security.JavaIoPackageAccess": {},
"security.NonFinalPublicField": {},
"security.NonFinalSubclassOfSensitiveInterface": {},
"security.ObjectFinalize": {},
"security.PublicFinalizeMethod": {},
"security.SystemExit": {},
"security.UnsafeArrayDeclaration": {},
"serialization.EnumCustomSerializationIgnored": {},
"serialization.SerialPersistentFields": {},
"serialization.SerialVersionUID": {},
"serialization.SerializableClassMustDefineSerialVersionUID": {},
"size.ClassSize": {},
"size.MethodCount": {},
"size.MethodSize": {},
"size.NestedBlockDepth": {},
"size.ParameterCount": {},
"unnecessary.AddEmptyString": {},
"unnecessary.ConsecutiveLiteralAppends": {},
"unnecessary.ConsecutiveStringConcatenation": {},
"unnecessary.UnnecessaryBigDecimalInstantiation": {},
"unnecessary.UnnecessaryBigIntegerInstantiation": {},
"unnecessary.UnnecessaryBooleanExpression": {},
"unnecessary.UnnecessaryBooleanInstantiation": {},
"unnecessary.UnnecessaryCallForLastElement": {},
"unnecessary.UnnecessaryCallToSubstring": {},
"unnecessary.UnnecessaryCast": {},
"unnecessary.UnnecessaryCatchBlock": {},
"unnecessary.UnnecessaryCollectCall": {},
"unnecessary.UnnecessaryCollectionCall": {},
"unnecessary.UnnecessaryConstructor": {},
"unnecessary.UnnecessaryDefInFieldDeclaration": {},
"unnecessary.UnnecessaryDefInMethodDeclaration": {},
"unnecessary.UnnecessaryDefInVariableDeclaration": {},
"unnecessary.UnnecessaryDotClass": {},
"unnecessary.UnnecessaryDoubleInstantiation": {},
"unnecessary.UnnecessaryElseStatement": {},
"unnecessary.UnnecessaryFinalOnPrivateMethod": {},
"unnecessary.UnnecessaryFloatInstantiation": {},
"unnecessary.UnnecessaryGString": {},
"unnecessary.UnnecessaryGetter": {},
"unnecessary.UnnecessaryIfStatement": {},
"unnecessary.UnnecessaryInstanceOfCheck": {},
"unnecessary.UnnecessaryInstantiationToGetClass": {},
"unnecessary.UnnecessaryIntegerInstantiation": {},
"unnecessary.UnnecessaryLongInstantiation": {},
"unnecessary.UnnecessaryModOne": {},
"unnecessary.UnnecessaryNullCheck": {},
"unnecessary.UnnecessaryNullCheckBeforeInstanceOf": {},
"unnecessary.UnnecessaryObjectReferences": {},
"unnecessary.UnnecessaryOverridingMethod": {},
"unnecessary.UnnecessaryPackageReference": {},
"unnecessary.UnnecessaryParenthesesForMethodCallWithClosure": {},
"unnecessary.UnnecessaryPublicModifier": {},
"unnecessary.UnnecessaryReturnKeyword": {},
"unnecessary.UnnecessarySafeNavigationOperator": {},
"unnecessary.UnnecessarySelfAssignment": {},
"unnecessary.UnnecessarySemicolon": {},
"unnecessary.UnnecessarySetter": {},
"unnecessary.UnnecessaryStringInstantiation": {},
"unnecessary.UnnecessarySubstring": {},
"unnecessary.UnnecessaryTernaryExpression": {},
"unnecessary.UnnecessaryToString": {},
"unnecessary.UnnecessaryTransientModifier": {},
"unused.UnusedArray": {},
"unused.UnusedMethodParameter": {},
"unused.UnusedObject": {},
"unused.UnusedPrivateField": {},
"unused.UnusedPrivateMethod": {},
"unused.UnusedPrivateMethodParameter": {},
"unused.UnusedVariable": {}
}
}

@@ -13,3 +13,3 @@ // Imports

const { recordAnonymousEvent } = require("./analytics.js");
const { getSourceLines, isErrorInLogLevelScope } = require("./utils");
const { getNpmGroovyLintVersion, getSourceLines, isErrorInLogLevelScope } = require("./utils");

@@ -183,12 +183,3 @@ class NpmGroovyLint {

if (this.options.version) {
let v = process.env.npm_package_version;
if (!v) {
try {
const FindPackageJson = require("find-package-json");
const finder = FindPackageJson(__dirname);
v = finder.next().value.version;
} catch {
v = "error";
}
}
const v = getNpmGroovyLintVersion();

@@ -195,0 +186,0 @@ const codeNarcVersionLinter = await new NpmGroovyLint([process.execPath, "", "--codenarcargs", "-version"], {}).run();

@@ -6,3 +6,3 @@ // Output management

const path = require("path");
const { isErrorInLogLevelScope } = require("./utils");
const { isErrorInLogLevelScope, getNpmGroovyLintVersion } = require("./utils");

@@ -231,3 +231,4 @@ // Compute statistics for output

const sarifRunBuilder = new SarifRunBuilder().initSimple({
name: "npm-groovy-lint",
toolDriverName: "npm-groovy-lint",
toolDriverVersion: getNpmGroovyLintVersion(),
url: "https://nvuillam.github.io/npm-groovy-lint/"

@@ -258,3 +259,3 @@ });

};
if (err.range) {
if (err && err.range && err.range.start && (err.range.start.line === 0 || err.range.start.line > 0)) {
sarifResultInit.startLine = fixLine(err.range.start.line);

@@ -261,0 +262,0 @@ sarifResultInit.startColumn = fixCol(err.range.start.character);

// Unused import
const { getVariable } = require("../utils");
const { getVariable, getVariableRange } = require("../utils");

@@ -15,2 +15,8 @@ const rule = {

],
range: {
type: "function",
func: (errLine, errItem, evaluatedVars) => {
return getVariableRange(errLine, evaluatedVars, "CLASSNAME", errItem);
}
},
fix: {

@@ -17,0 +23,0 @@ label: "Remove unused import",

@@ -397,2 +397,16 @@ // Shared functions

function getNpmGroovyLintVersion(){
let v = process.env.npm_package_version;
if (!v) {
try {
const FindPackageJson = require("find-package-json");
const finder = FindPackageJson(__dirname);
v = finder.next().value.version;
} catch {
v = "error";
}
}
return v ;
}
module.exports = {

@@ -409,2 +423,3 @@ addImport,

getLastStringRange,
getNpmGroovyLintVersion,
getOutOfBracesStrings,

@@ -411,0 +426,0 @@ getSourceLines,

{
"name": "npm-groovy-lint",
"version": "9.4.0",
"version": "9.4.1",
"description": "Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle files",

@@ -61,3 +61,3 @@ "main": "index.js",

"java-caller": "^2.2.4",
"node-sarif-builder": "^1.0.0",
"node-sarif-builder": "^2.0.1",
"optionator": "^0.8.3",

@@ -64,0 +64,0 @@ "semver": "^7.1.3",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc