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.3.0 to 9.3.1

lib/example/file with spaces.groovy

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

## [9.3.1] 2022-01-06
- Fix issue when used as module and with file containing spaces ([VsCodeGroovyLint #137](https://github.com/nvuillam/vscode-groovy-lint/issues/137))
## [9.3.0] 2021-12-29

@@ -7,0 +11,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": {}
}
}

@@ -5,3 +5,3 @@ // Shared functions

const debug = require("debug")("npm-groovy-lint");
const fse = require("fs-extra");
const fs = require("fs-extra");
const os = require("os");

@@ -33,3 +33,3 @@ const path = require("path");

cnPath = path.resolve(os.tmpdir() + "/npm-groovy-lint");
await fse.ensureDir(cnPath, { mode: "0777" });
await fs.ensureDir(cnPath, { mode: "0777" });
// File path is sent (recommended): use it to create temp file name

@@ -39,5 +39,6 @@ if (options.sourcefilepath) {

cnPath = cnPath + "/codeNarcTmpDir_" + Math.random();
await fse.ensureDir(cnPath, { mode: "0777" });
result.tmpGroovyFileName = path.resolve(cnPath + "/" + pathParse.base);
cnFiles = "**/" + pathParse.base;
await fs.ensureDir(cnPath, { mode: "0777" });
const pathBase = pathParse.base.replace(/ /g, '_');
result.tmpGroovyFileName = path.resolve(cnPath + "/" + pathBase);
cnFiles = "**/" + pathBase;
}

@@ -51,3 +52,3 @@ // Use default random file name

await fse.writeFile(result.tmpGroovyFileName, normalizeNewLines(options.source));
await fs.writeFile(result.tmpGroovyFileName, normalizeNewLines(options.source));
debug(`CREATE GROOVY temp file ${result.tmpGroovyFileName} with input source, as CodeNarc requires physical files`);

@@ -274,3 +275,3 @@ }

const configAllFileName = await getConfigFileName(__dirname, null, [".groovylintrc-all.json"]);
const grooylintrcAllRules = Object.keys(JSON.parse(fse.readFileSync(configAllFileName, "utf8").toString()).rules);
const grooylintrcAllRules = Object.keys(JSON.parse(fs.readFileSync(configAllFileName, "utf8").toString()).rules);
const rules = {};

@@ -303,3 +304,3 @@ for (const ruleDef of codeNarcJsonResult.rules) {

// Encode file name so CodeNarc understands it
if (fse.exists(fullFile)) {
if (fs.existsSync(fullFile)) {
return "file:" + encodeURIComponent(fullFile);

@@ -424,3 +425,3 @@ }

if (tmpGroovyFileName) {
await fse.remove(tmpGroovyFileName);
await fs.remove(tmpGroovyFileName);
debug(`Removed temp file ${tmpGroovyFileName} as it is not longer used`);

@@ -427,0 +428,0 @@ tmpGroovyFileName = null;

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

@@ -5,0 +5,0 @@ "main": "index.js",

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