CodeNarcServer unexpected error: Request failed with status code 500 (report is still generated)
ryeleo opened this issue · 10 comments
Hello, I've been running into a "500 error" when I run this tool using Docker in my groovy project.
NOTE: The desired output does seem to appear AFTER the big error.
$ docker run --rm -u "$(id -u):$(id -g)" -w=/tmp -v "$PWD":/tmp nvuillam/npm-groovy-lint --failon warning --verbose
CodeNarcServer unexpected error:
{
"message": "Request failed with status code 500",
"name": "Error",
"stack": "Error: Request failed with status code 500\n at createError (/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (/node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (events.js:326:22)\n at endReadableNT (_stream_readable.js:1241:12)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)",
"config": {
"url": "http://localhost:7484/request",
"method": "post",
"data": "{\"codeNarcArgs\":\"-basedir=/tmp -ruleset=%7B%22AbstractClassName%22%3A%7B%7D%2C%22AbstractClassWithoutAbstractMethod%22%3A%7B%7D%2C%22AbstractClassWithPublicConstructor%22%3A%7B%7D%2C%22AddEmptyString%22%3A%7B%7D%2C%22AssertWithinFinallyBlock%22%3A%7B%7D%2C%22AssignCollectionSort%22%3A%7B%7D%2C%22AssignCollectionUnique%22%3A%7B%7D%2C%22AssignmentInConditional%22%3A%7B%7D%2C%22AssignmentToStaticFieldFromInstanceMethod%22%3A%7B%7D%2C%22BigDecimalInstantiation%22%3A%7B%7D%2C%22BitwiseOperatorInConditional%22%3A%7B%7D%2C%22BlankLineBeforePackage%22%3A%7B%7D%2C%22BlockEndsWithBlankLine%22%3A%7B%7D%2C%22BlockStartsWithBlankLine%22%3A%7B%7D%2C%22BooleanGetBoolean%22%3A%7B%7D%2C%22BooleanMethodReturnsNull%22%3A%7B%7D%2C%22BracesForClass%22%3A%7B%22priority%22%3A3%7D%2C%22BracesForForLoop%22%3A%7B%22priority%22%3A3%7D%2C%22BracesForIfElse%22%3A%7B%22priority%22%3A3%7D%2C%22BracesForMethod%22%3A%7B%22priority%22%3A3%7D%2C%22BracesForTryCatchFinally%22%3A%7B%22priority%22%3A3%7D%2C%22BrokenNullCheck%22%3A%7B%7D%2C%22BrokenOddnessCheck%22%3A%7B%7D%2C%22BuilderMethodWithSideEffects%22%3A%7B%7D%2C%22BusyWait%22%3A%7B%7D%2C%22CatchArrayIndexOutOfBoundsException%22%3A%7B%7D%2C%22CatchError%22%3A%7B%7D%2C%22CatchIllegalMonitorStateException%22%3A%7B%7D%2C%22CatchIndexOutOfBoundsException%22%3A%7B%7D%2C%22CatchNullPointerException%22%3A%7B%7D%2C%22CatchRuntimeException%22%3A%7B%7D%2C%22CatchThrowable%22%3A%7B%7D%2C%22ChainedTest%22%3A%7B%7D%2C%22ClassEndsWithBlankLine%22%3A%7B%7D%2C%22ClassForName%22%3A%7B%7D%2C%22ClassJavadoc%22%3A%7B%7D%2C%22ClassName%22%3A%7B%7D%2C%22ClassNameSameAsFilename%22%3A%7B%7D%2C%22ClassNameSameAsSuperclass%22%3A%7B%7D%2C%22ClassSize%22%3A%7B%7D%2C%22ClassStartsWithBlankLine%22%3A%7B%7D%2C%22CloneableWithoutClone%22%3A%7B%7D%2C%22CloneWithoutCloneable%22%3A%7B%7D%2C%22CloseWithoutCloseable%22%3A%7B%7D%2C%22ClosureAsLastMethodParameter%22%3A%7B%7D%2C%22ClosureStatementOnOpeningLineOfMultipleLineClosure%22%3A%7B%7D%2C%22CollectAllIsDeprecated%22%3A%7B%7D%2C%22CompareToWithoutComparable%22%3A%7B%7D%2C%22ComparisonOfTwoConstants%22%3A%7B%7D%2C%22ComparisonWithSelf%22%3A%7B%7D%2C%22ConfusingClassNamedException%22%3A%7B%7D%2C%22ConfusingMethodName%22%3A%7B%7D%2C%22ConfusingMultipleReturns%22%3A%7B%7D%2C%22ConfusingTernary%22%3A%7B%7D%2C%22ConsecutiveBlankLines%22%3A%7B%7D%2C%22ConsecutiveLiteralAppends%22%3A%7B%7D%2C%22ConsecutiveStringConcatenation%22%3A%7B%7D%2C%22ConstantAssertExpression%22%3A%7B%7D%2C%22ConstantIfExpression%22%3A%7B%7D%2C%22ConstantsOnlyInterface%22%3A%7B%7D%2C%22ConstantTernaryExpression%22%3A%7B%7D%2C%22CouldBeElvis%22%3A%7B%7D%2C%22CouldBeSwitchStatement%22%3A%7B%7D%2C%22CoupledTestCase%22%3A%7B%7D%2C%22DeadCode%22%3A%7B%22priority%22%3A1%7D%2C%22DirectConnectionManagement%22%3A%7B%7D%2C%22DoubleCheckedLocking%22%3A%7B%7D%2C%22DoubleNegative%22%3A%7B%7D%2C%22DuplicateCaseStatement%22%3A%7B%7D%2C%22DuplicateImport%22%3A%7B%7D%2C%22DuplicateMapKey%22%3A%7B%7D%2C%22DuplicateSetValue%22%3A%7B%7D%2C%22ElseBlockBraces%22%3A%7B%7D%2C%22EmptyCatchBlock%22%3A%7B%7D%2C%22EmptyClass%22%3A%7B%7D%2C%22EmptyElseBlock%22%3A%7B%7D%2C%22EmptyFinallyBlock%22%3A%7B%7D%2C%22EmptyForStatement%22%3A%7B%7D%2C%22EmptyIfStatement%22%3A%7B%7D%2C%22EmptyInstanceInitializer%22%3A%7B%7D%2C%22EmptyMethod%22%3A%7B%7D%2C%22EmptyMethodInAbstractClass%22%3A%7B%7D%2C%22EmptyStaticInitializer%22%3A%7B%7D%2C%22EmptySwitchStatement%22%3A%7B%7D%2C%22EmptySynchronizedStatement%22%3A%7B%7D%2C%22EmptyTryBlock%22%3A%7B%7D%2C%22EmptyWhileStatement%22%3A%7B%7D%2C%22EnumCustomSerializationIgnored%22%3A%7B%7D%2C%22EqualsAndHashCode%22%3A%7B%7D%2C%22EqualsOverloaded%22%3A%7B%7D%2C%22ExceptionExtendsError%22%3A%7B%7D%2C%22ExceptionExtendsThrowable%22%3A%7B%7D%2C%22ExceptionNotThrown%22%3A%7B%7D%2C%22ExplicitArrayListInstantiation%22%3A%7B%7D%2C%22ExplicitCallToAndMethod%22%3A%7B%7D%2C%22ExplicitCallToCompareToMethod%22%3A%7B%7D%2C%22ExplicitCallToDivMethod%22%3A%7B%7D%2C%22ExplicitCallToEqualsMethod%22%3A%7B%22priority%22%3A3%7D%2C%22ExplicitCallToGetAtMethod%22%3A%7B%7D%2C%22ExplicitCallToLeftShiftMethod%22%3A%7B%7D%2C%22ExplicitCallToMinusMethod%22%3A%7B%7D%2C%22ExplicitCallToModMethod%22%3A%7B%7D%2C%22ExplicitCallToMultiplyMethod%22%3A%7B%7D%2C%22ExplicitCallToOrMethod%22%3A%7B%7D%2C%22ExplicitCallToPlusMethod%22%3A%7B%7D%2C%22ExplicitCallToPowerMethod%22%3A%7B%7D%2C%22ExplicitCallToPutAtMethod%22%3A%7B%7D%2C%22ExplicitCallToRightShiftMethod%22%3A%7B%7D%2C%22ExplicitCallToXorMethod%22%3A%7B%7D%2C%22ExplicitGarbageCollection%22%3A%7B%7D%2C%22ExplicitHashMapInstantiation%22%3A%7B%7D%2C%22ExplicitHashSetInstantiation%22%3A%7B%7D%2C%22ExplicitLinkedHashMapInstantiation%22%3A%7B%7D%2C%22ExplicitLinkedListInstantiation%22%3A%7B%7D%2C%22ExplicitStackInstantiation%22%3A%7B%7D%2C%22ExplicitTreeSetInstantiation%22%3A%7B%7D%2C%22FieldName%22%3A%7B%7D%2C%22FieldTypeRequired%22%3A%7B%22priority%22%3A3%7D%2C%22FileCreateTempFile%22%3A%7B%7D%2C%22FileEndsWithoutNewline%22%3A%7B%7D%2C%22FinalClassWithProtectedMember%22%3A%7B%7D%2C%22ForLoopShouldBeWhileLoop%22%3A%7B%7D%2C%22ForStatementBraces%22%3A%7B%7D%2C%22GetterMethodCouldBeProperty%22%3A%7B%7D%2C%22GrailsDomainGormMethods%22%3A%7B%7D%2C%22GrailsDomainHasEquals%22%3A%7B%7D%2C%22GrailsDomainHasToString%22%3A%7B%7D%2C%22GrailsDomainReservedSqlKeywordName%22%3A%7B%7D%2C%22GrailsDomainStringPropertyMaxSize%22%3A%7B%7D%2C%22GrailsDomainWithServiceReference%22%3A%7B%7D%2C%22GrailsDuplicateConstraint%22%3A%7B%7D%2C%22GrailsDuplicateMapping%22%3A%7B%7D%2C%22GrailsMassAssignment%22%3A%7B%7D%2C%22GrailsPublicControllerMethod%22%3A%7B%7D%2C%22GrailsServletContextReference%22%3A%7B%7D%2C%22GrailsStatelessService%22%3A%7B%7D%2C%22GroovyLangImmutable%22%3A%7B%7D%2C%22GStringAsMapKey%22%3A%7B%7D%2C%22GStringExpressionWithinString%22%3A%7B%7D%2C%22HardCodedWindowsFileSeparator%22%3A%7B%7D%2C%22HardCodedWindowsRootDirectory%22%3A%7B%7D%2C%22HashtableIsObsolete%22%3A%7B%7D%2C%22IfStatementBraces%22%3A%7B%7D%2C%22IfStatementCouldBeTernary%22%3A%7B%22priority%22%3A3%7D%2C%22IllegalClassMember%22%3A%7B%7D%2C%22IllegalClassReference%22%3A%7B%7D%2C%22IllegalPackageReference%22%3A%7B%7D%2C%22IllegalRegex%22%3A%7B%7D%2C%22IllegalString%22%3A%7B%7D%2C%22IllegalSubclass%22%3A%7B%7D%2C%22ImplementationAsType%22%3A%7B%7D%2C%22ImplicitClosureParameter%22%3A%7B%7D%2C%22ImplicitReturnStatement%22%3A%7B%7D%2C%22ImportFromSamePackage%22%3A%7B%7D%2C%22ImportFromSunPackages%22%3A%7B%7D%2C%22InconsistentPropertyLocking%22%3A%7B%7D%2C%22InconsistentPropertySynchronization%22%3A%7B%7D%2C%22Indentation%22%3A%7B%22priority%22%3A3%2C%22spacesPerIndentLevel%22%3A4%7D%2C%22InsecureRandom%22%3A%7B%7D%2C%22Instanceof%22%3A%7B%7D%2C%22IntegerGetInteger%22%3A%7B%7D%2C%22InterfaceName%22%3A%7B%7D%2C%22InterfaceNameSameAsSuperInterface%22%3A%7B%7D%2C%22InvertedCondition%22%3A%7B%7D%2C%22InvertedIfElse%22%3A%7B%7D%2C%22JavadocConsecutiveEmptyLines%22%3A%7B%7D%2C%22JavadocEmptyAuthorTag%22%3A%7B%7D%2C%22JavadocEmptyExceptionTag%22%3A%7B%7D%2C%22JavadocEmptyFirstLine%22%3A%7B%7D%2C%22JavadocEmptyLastLine%22%3A%7B%7D%2C%22JavadocEmptyParamTag%22%3A%7B%7D%2C%22JavadocEmptyReturnTag%22%3A%7B%7D%2C%22JavadocEmptySeeTag%22%3A%7B%7D%2C%22JavadocEmptySinceTag%22%3A%7B%7D%2C%22JavadocEmptyThrowsTag%22%3A%7B%7D%2C%22JavadocEmptyVersionTag%22%3A%7B%7D%2C%22JavadocMissingExceptionDescription%22%3A%7B%7D%2C%22JavadocMissingParamDescription%22%3A%7B%7D%2C%22JavadocMissingThrowsDescription%22%3A%7B%7D%2C%22JavaIoPackageAccess%22%3A%7B%7D%2C%22JdbcConnectionReference%22%3A%7B%7D%2C%22JdbcResultSetReference%22%3A%7B%7D%2C%22JdbcStatementReference%22%3A%7B%7D%2C%22JUnitAssertAlwaysFails%22%3A%7B%7D%2C%22JUnitAssertAlwaysSucceeds%22%3A%7B%7D%2C%22JUnitAssertEqualsConstantActualValue%22%3A%7B%7D%2C%22JUnitFailWithoutMessage%22%3A%7B%7D%2C%22JUnitLostTest%22%3A%7B%7D%2C%22JUnitPublicField%22%3A%7B%7D%2C%22JUnitPublicNonTestMethod%22%3A%7B%7D%2C%22JUnitSetUpCallsSuper%22%3A%7B%7D%2C%22JUnitStyleAssertions%22%3A%7B%7D%2C%22JUnitTearDownCallsSuper%22%3A%7B%7D%2C%22JUnitTestMethodWithoutAssert%22%3A%7B%7D%2C%22JUnitUnnecessarySetUp%22%3A%7B%7D%2C%22JUnitUnnecessaryTearDown%22%3A%7B%7D%2C%22JUnitUnnecessaryThrowsException%22%3A%7B%7D%2C%22LocaleSetDefault%22%3A%7B%7D%2C%22LoggerForDifferentClass%22%3A%7B%7D%2C%22LoggerWithWrongModifiers%22%3A%7B%7D%2C%22LoggingSwallowsStacktrace%22%3A%7B%7D%2C%22LongLiteralWithLowerCaseL%22%3A%7B%7D%2C%22MethodCount%22%3A%7B%7D%2C%22MethodName%22%3A%7B%7D%2C%22MethodParameterTypeRequired%22%3A%7B%7D%2C%22MisorderedStaticImports%22%3A%7B%7D%2C%22MissingBlankLineAfterImports%22%3A%7B%7D%2C%22MissingBlankLineAfterPackage%22%3A%7B%7D%2C%22MissingBlankLineBeforeAnnotatedField%22%3A%7B%7D%2C%22MissingNewInThrowStatement%22%3A%7B%7D%2C%22MissingOverrideAnnotation%22%3A%7B%7D%2C%22MultipleLoggers%22%3A%7B%7D%2C%22MultipleUnaryOperators%22%3A%7B%7D%2C%22NestedForLoop%22%3A%7B%7D%2C%22NestedSynchronization%22%3A%7B%7D%2C%22NoDouble%22%3A%7B%7D%2C%22NoFloat%22%3A%7B%7D%2C%22NoJavaUtilDate%22%3A%7B%7D%2C%22NonFinalPublicField%22%3A%7B%7D%2C%22NonFinalSubclassOfSensitiveInterface%22%3A%7B%7D%2C%22NoTabCharacter%22%3A%7B%7D%2C%22NoWildcardImports%22%3A%7B%7D%2C%22ObjectFinalize%22%3A%7B%7D%2C%22ObjectOverrideMisspelledMethodName%22%3A%7B%7D%2C%22OptionalCollectionReturnType%22%3A%7B%7D%2C%22OptionalField%22%3A%7B%7D%2C%22OptionalMethodParameter%22%3A%7B%7D%2C%22PackageName%22%3A%7B%7D%2C%22PackageNameMatchesFilePath%22%3A%7B%7D%2C%22ParameterAssignmentInFilterClosure%22%3A%7B%7D%2C%22ParameterCount%22%3A%7B%7D%2C%22ParameterName%22%3A%7B%7D%2C%22ParameterReassignment%22%3A%7B%7D%2C%22PrintStackTrace%22%3A%7B%7D%2C%22PrivateFieldCouldBeFinal%22%3A%7B%7D%2C%22PropertyName%22%3A%7B%7D%2C%22PublicFinalizeMethod%22%3A%7B%7D%2C%22PublicInstanceField%22%3A%7B%7D%2C%22PublicMethodsBeforeNonPublicMethods%22%3A%7B%7D%2C%22RandomDoubleCoercedToZero%22%3A%7B%7D%2C%22RemoveAllOnSelf%22%3A%7B%7D%2C%22RequiredRegex%22%3A%7B%7D%2C%22RequiredString%22%3A%7B%7D%2C%22ReturnFromFinallyBlock%22%3A%7B%7D%2C%22ReturnNullFromCatchBlock%22%3A%7B%7D%2C%22ReturnsNullInsteadOfEmptyArray%22%3A%7B%7D%2C%22ReturnsNullInsteadOfEmptyCollection%22%3A%7B%7D%2C%22SerializableClassMustDefineSerialVersionUID%22%3A%7B%7D%2C%22SerialPersistentFields%22%3A%7B%7D%2C%22SerialVersionUID%22%3A%7B%7D%2C%22SimpleDateFormatMissingLocale%22%3A%7B%7D%2C%22SpaceAfterCatch%22%3A%7B%7D%2C%22SpaceAfterClosingBrace%22%3A%7B%7D%2C%22SpaceAfterComma%22%3A%7B%7D%2C%22SpaceAfterFor%22%3A%7B%7D%2C%22SpaceAfterIf%22%3A%7B%7D%2C%22SpaceAfterMethodCallName%22%3A%7B%7D%2C%22SpaceAfterMethodDeclarationName%22%3A%7B%7D%2C%22SpaceAfterNotOperator%22%3A%7B%7D%2C%22SpaceAfterOpeningBrace%22%3A%7B%7D%2C%22SpaceAfterSemicolon%22%3A%7B%7D%2C%22SpaceAfterSwitch%22%3A%7B%7D%2C%22SpaceAfterWhile%22%3A%7B%7D%2C%22SpaceAroundClosureArrow%22%3A%7B%7D%2C%22SpaceAroundOperator%22%3A%7B%7D%2C%22SpaceBeforeClosingBrace%22%3A%7B%7D%2C%22SpaceBeforeOpeningBrace%22%3A%7B%7D%2C%22SpaceInsideParentheses%22%3A%7B%7D%2C%22SpockIgnoreRestUsed%22%3A%7B%7D%2C%22StatelessClass%22%3A%7B%7D%2C%22StatelessSingleton%22%3A%7B%7D%2C%22StaticCalendarField%22%3A%7B%7D%2C%22StaticConnection%22%3A%7B%7D%2C%22StaticDateFormatField%22%3A%7B%7D%2C%22StaticFieldsBeforeInstanceFields%22%3A%7B%7D%2C%22StaticMatcherField%22%3A%7B%7D%2C%22StaticMethodsBeforeInstanceMethods%22%3A%7B%7D%2C%22StaticSimpleDateFormatField%22%3A%7B%7D%2C%22SwallowThreadDeath%22%3A%7B%7D%2C%22SynchronizedMethod%22%3A%7B%7D%2C%22SynchronizedOnBoxedPrimitive%22%3A%7B%7D%2C%22SynchronizedOnGetClass%22%3A%7B%7D%2C%22SynchronizedOnReentrantLock%22%3A%7B%7D%2C%22SynchronizedOnString%22%3A%7B%7D%2C%22SynchronizedOnThis%22%3A%7B%7D%2C%22SynchronizedReadObjectMethod%22%3A%7B%7D%2C%22SystemErrPrint%22%3A%7B%7D%2C%22SystemExit%22%3A%7B%7D%2C%22SystemOutPrint%22%3A%7B%7D%2C%22SystemRunFinalizersOnExit%22%3A%7B%7D%2C%22TernaryCouldBeElvis%22%3A%7B%7D%2C%22ThisReferenceEscapesConstructor%22%3A%7B%7D%2C%22ThreadGroup%22%3A%7B%7D%2C%22ThreadLocalNotStaticFinal%22%3A%7B%7D%2C%22ThreadYield%22%3A%7B%7D%2C%22ThrowError%22%3A%7B%7D%2C%22ThrowException%22%3A%7B%22priority%22%3A3%7D%2C%22ThrowExceptionFromFinallyBlock%22%3A%7B%7D%2C%22ThrowNullPointerException%22%3A%7B%22priority%22%3A3%7D%2C%22ThrowRuntimeException%22%3A%7B%22priority%22%3A3%7D%2C%22ThrowThrowable%22%3A%7B%22priority%22%3A3%7D%2C%22ToStringReturnsNull%22%3A%7B%7D%2C%22TrailingWhitespace%22%3A%7B%7D%2C%22UnnecessaryBigDecimalInstantiation%22%3A%7B%7D%2C%22UnnecessaryBigIntegerInstantiation%22%3A%7B%7D%2C%22UnnecessaryBooleanExpression%22%3A%7B%7D%2C%22UnnecessaryBooleanInstantiation%22%3A%7B%7D%2C%22UnnecessaryCallForLastElement%22%3A%7B%7D%2C%22UnnecessaryCallToSubstring%22%3A%7B%7D%2C%22UnnecessaryCast%22%3A%7B%7D%2C%22UnnecessaryCatchBlock%22%3A%7B%7D%2C%22UnnecessaryCollectCall%22%3A%7B%7D%2C%22UnnecessaryCollectionCall%22%3A%7B%7D%2C%22UnnecessaryConstructor%22%3A%7B%7D%2C%22UnnecessaryDefInFieldDeclaration%22%3A%7B%7D%2C%22UnnecessaryDefInMethodDeclaration%22%3A%7B%7D%2C%22UnnecessaryDefInVariableDeclaration%22%3A%7B%7D%2C%22UnnecessaryDotClass%22%3A%7B%7D%2C%22UnnecessaryDoubleInstantiation%22%3A%7B%7D%2C%22UnnecessaryFail%22%3A%7B%7D%2C%22UnnecessaryFinalOnPrivateMethod%22%3A%7B%7D%2C%22UnnecessaryFloatInstantiation%22%3A%7B%7D%2C%22UnnecessaryGroovyImport%22%3A%7B%7D%2C%22UnnecessaryGString%22%3A%7B%7D%2C%22UnnecessaryIfStatement%22%3A%7B%7D%2C%22UnnecessaryInstanceOfCheck%22%3A%7B%7D%2C%22UnnecessaryInstantiationToGetClass%22%3A%7B%7D%2C%22UnnecessaryIntegerInstantiation%22%3A%7B%7D%2C%22UnnecessaryLongInstantiation%22%3A%7B%7D%2C%22UnnecessaryModOne%22%3A%7B%7D%2C%22UnnecessaryNullCheck%22%3A%7B%7D%2C%22UnnecessaryNullCheckBeforeInstanceOf%22%3A%7B%7D%2C%22UnnecessaryObjectReferences%22%3A%7B%7D%2C%22UnnecessaryOverridingMethod%22%3A%7B%7D%2C%22UnnecessaryPackageReference%22%3A%7B%7D%2C%22UnnecessaryPublicModifier%22%3A%7B%7D%2C%22UnnecessarySafeNavigationOperator%22%3A%7B%7D%2C%22UnnecessarySelfAssignment%22%3A%7B%7D%2C%22UnnecessarySemicolon%22%3A%7B%7D%2C%22UnnecessarySetter%22%3A%7B%7D%2C%22UnnecessaryStringInstantiation%22%3A%7B%7D%2C%22UnnecessaryTernaryExpression%22%3A%7B%7D%2C%22UnnecessaryToString%22%3A%7B%7D%2C%22UnnecessaryTransientModifier%22%3A%7B%7D%2C%22UnsafeArrayDeclaration%22%3A%7B%7D%2C%22UnsafeImplementationAsMap%22%3A%7B%7D%2C%22UnusedArray%22%3A%7B%22priority%22%3A1%7D%2C%22UnusedImport%22%3A%7B%7D%2C%22UnusedMethodParameter%22%3A%7B%7D%2C%22UnusedObject%22%3A%7B%22priority%22%3A1%7D%2C%22UnusedPrivateField%22%3A%7B%22priority%22%3A1%7D%2C%22UnusedPrivateMethod%22%3A%7B%22priority%22%3A1%7D%2C%22UnusedPrivateMethodParameter%22%3A%7B%22priority%22%3A1%7D%2C%22UseAssertEqualsInsteadOfAssertTrue%22%3A%7B%7D%2C%22UseAssertFalseInsteadOfNegation%22%3A%7B%7D%2C%22UseAssertNullInsteadOfAssertEquals%22%3A%7B%7D%2C%22UseAssertSameInsteadOfAssertTrue%22%3A%7B%7D%2C%22UseAssertTrueInsteadOfAssertEquals%22%3A%7B%7D%2C%22UseAssertTrueInsteadOfNegation%22%3A%7B%7D%2C%22UseCollectMany%22%3A%7B%7D%2C%22UseCollectNested%22%3A%7B%7D%2C%22UseOfNotifyMethod%22%3A%7B%7D%2C%22VectorIsObsolete%22%3A%7B%7D%2C%22VolatileArrayField%22%3A%7B%7D%2C%22VolatileLongOrDoubleField%22%3A%7B%7D%2C%22WaitOutsideOfWhileLoop%22%3A%7B%7D%2C%22WhileStatementBraces%22%3A%7B%7D%7D -includes=**/*.groovy,**/*.gvy,**/Jenkinsfile,**/*.gradle,**/*.nf -report=json:stdout\",\"codeNarcBaseDir\":\"/tmp\",\"codeNarcIncludes\":\"**/*.groovy,**/*.gvy,**/Jenkinsfile,**/*.gradle,**/*.nf\",\"parse\":true,\"file\":null,\"fileList\":null,\"requestKey\":null}",
"headers": {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"User-Agent": "axios/0.21.4",
"Content-Length": 15389
},
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 600000,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1,
"transitional": {
"silentJSONParsing": true,
"forcedJSONParsing": true,
"clarifyTimeoutError": false
}
}
}
"java.base/java.lang.Module.isStaticallyExportedOrOpen(Module.java:574)\njava.base/java.lang.Module.implIsExportedOrOpen(Module.java:556)\njava.base/java.lang.Module.isExported(Module.java:456)\norg.codehaus.groovy.vmplugin.v9.Java9.checkAccessible(Java9.java:353)\n...trimmed...groovy.json.DefaultJsonGenerator.writeMap(DefaultJsonGenerator.java:369)\ngroovy.json.DefaultJsonGenerator.writeObject(DefaultJsonGenerator.java:231)\ngroovy.json.DefaultJsonGenerator.writeMapEntry(DefaultJsonGenerator.java:381)"
/tmp/build.gradle
15 info The String 'org.junit.jupiter:junit-jupiter:5.9.2' can be wrapped in single quotes instead of double quotes UnnecessaryGString
16 info The String 'org.junit.platform:junit-platform-launcher' can be wrapped in single quotes instead of double quotes UnnecessaryGString
28 info The String 'com.google.truth:truth:1.1.4' can be wrapped in single quotes instead of double quotes UnnecessaryGString
47 info The String 'com.lesfurets:jenkins-pipeline-unit:1.19' can be wrapped in single quotes instead of double quotes UnnecessaryGString
48 info Code block ends with a blank line. BlockEndsWithBlankLine
74 info The String '\.' can be wrapped in single quotes instead of double quotes UnnecessaryGString
78 info The statement on line 78 in class None is at the incorrect indent level: Expected one of columns [9, 13, 17] but was 8 Indentation
84 info By convention closure parameters should be specified explicitly. ImplicitClosureParameter
85 info By convention closure parameters should be specified explicitly. ImplicitClosureParameter
86 info By convention closure parameters should be specified explicitly. ImplicitClosureParameter
87 info By convention closure parameters should be specified explicitly. ImplicitClosureParameter
89 info By convention closure parameters should be specified explicitly. ImplicitClosureParameter
95 info The statement on line 95 in class None is at the incorrect indent level: Expected one of columns [5, 9, 13] but was 3 Indentation
96 info The statement on line 96 in class None is at the incorrect indent level: Expected one of columns [9, 13, 17] but was 5 Indentation
97 info The statement on line 97 in class None is at the incorrect indent level: Expected one of columns [13, 17, 21] but was 7 Indentation
100 info The statement on line 100 in class None is at the incorrect indent level: Expected one of columns [5, 9, 13] but was 3 Indentation
101 info The statement on line 101 in class None is at the incorrect indent level: Expected one of columns [9, 13, 17] but was 5 Indentation
102 info The statement on line 102 in class None is at the incorrect indent level: Expected one of columns [13, 17, 21] but was 7 Indentation
106 info File build.gradle has consecutive blank lines ConsecutiveBlankLines
109 info The statement on line 109 in class None is at the incorrect indent level: Expected one of columns [5, 9, 13] but was 3 Indentation
110 info File build.gradle does not end with a newline FileEndsWithoutNewline
110 info The statement on line 110 in class None is at the incorrect indent level: Expected one of columns [5, 9, 13] but was 3 Indentation
/tmp/Jenkinsfile
14 info Line ends with whitespace characters TrailingWhitespace
npm-groovy-lint results in 2 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 0 │
│ 2 │ 'Info' │ 23 │
└─────────┴───────────┴─────────────┘
It seems that the error disappears if I orient docker to use "$PWD/src" instead of just "$PWD":
docker run --rm -u "$(id -u):$(id -g)" -w=/tmp -v "$PWD/src":/tmp nvuillam/npm-groovy-lint --failon warning --verbose
This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.
If you think this issue should stay open, please remove the O: stale 🤖
label or comment on the issue.
a new version solving many issues is coming soon :)
I guess it's a bad idea to mount something to /tmp...
Anyway, just wanted to note that error 500 is also generated if the current path contains a space. That is with or without using Docker.
Example:
~/groovylinttest/MY TEST $ npm-groovy-lint *.groovy
CodeNarcServer unexpected error:
{
"message": "Request failed with status code 500",
"name": "Error",
"stack": "Error: Request failed with status code 500\n at createError (/opt/homebrew/lib/node_modules/npm-groovy-l,
"config": {
"url": "http://localhost:7484/request",
"method": "post",
"data": "{\"codeNarcArgs\":\"-basedir=/Users/myuser/groovylinttest/MY TEST -ruleset=%7B%22AbstractClassName%22%3,
The issue obviously being here that the path is passed as codeNarcArgs -basedir unquoted.
@InvisibleSmiley please can you check with v13.0.0 ? :)
Have the same issue with v13.0.0 @nvuillam
(and with 11.1.1 as well)
@InvisibleSmiley
I can reproduce the issue with this path:
-basedir=/var/lib/jenkins/workspace/jenkins-libs_main
So looks like not only spaces are causing this error (which is in fact warning, since the report is still generated in the end)
Can you see if the latest version still has this issue as there's been some fixes I think may have addressed this?
Can you see if the latest version still has this issue as there's been some fixes I think may have addressed this?
It looks good on my side now. Thanks!
Thanks for your feedback :)