nvuillam / npm-groovy-lint Goto Github PK
View Code? Open in Web Editor NEWLint, format and auto-fix your Groovy / Jenkinsfile / Gradle files using command line
Home Page: https://nvuillam.github.io/npm-groovy-lint/
License: MIT License
Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle files using command line
Home Page: https://nvuillam.github.io/npm-groovy-lint/
License: MIT License
pipeline {
agent any
stages {
stage('test') {
steps {
echo 'bad indent'
}
}
}
npx npm-groovy-lint -f Jenkinsfile
# 0 error, 0 warning, 0 info
docker run -u "$(id -u):$(id -g)" -w=/tmp -v "$PWD/Jenkinsfile":/tmp/Jenkinsfile nvuillam/npm-groovy-lint
GroovyLint: Started CodeNarc Server
/tmp/Jenkinsfile
1 warning Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic CompileStatic
2 info The statement on line 2 in class None is at the incorrect indent level: Expected column 1 but was 3 Indentation
3 info The statement on line 3 in class None is at the incorrect indent level: Expected column 1 but was 3 Indentation
4 info The statement on line 4 in class None is at the incorrect indent level: Expected one of columns [5, 9, 13] but was 15 Indentation
5 info The statement on line 5 in class None is at the incorrect indent level: Expected one of columns [9, 13, 17] but was 7 Indentation
6 info The statement on line 6 in class None is at the incorrect indent level: Expected one of columns [13, 17, 21] but was 1 Indentation
/tmp/npm-groovy-lint/codeNarcTmpRs_0.5641933801119414.groovy
1 warning Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic CompileStatic
2 info Code block starts with a blank line. BlockStartsWithBlankLine
159 info The map entry spacesPerIndentLevel:4 within class None is not preceded by a space or whitespace SpaceAfterComma
359 info Code block ends with a blank line. BlockEndsWithBlankLine
npm-groovy-lint results in 2 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 2 │
│ 2 │ 'Info' │ 8 │
└─────────┴───────────┴─────────────┘
package.json not found, use default value {"name":"npm-groovy-lint","version":"0.0.0"} instead
their results are not the same, and docker output two files but I only mount 1 file to it.
Indentation in some files are not fixed. I cannot still understand what is the exact line which causes this issue. However all files have correct syntax.
I have .groovylintrc.json
:
{
"extends": "recommended-jenkinsfile",
"rules": {
"ClassJavadoc": "off",
"DuplicateNumberLiteral": "off",
"DuplicateStringLiteral": "off",
"formatting.Indentation": {
"severity": "error",
"spacesPerIndentLevel": 2
}
}
}
listView('123') {
description('asd')
jobs {
name('qwe')
name('zxc')
name('cvb')
}
columns {
status()
weather()
name()
lastSuccess()
lastFailure()
lastDuration()
buildButton()
}
}
npm-groovy-lint -f myfile.groovy --fix
npm-groovy-lint results in 1 linted files:
┌─────────┬───────────┬─────────────┬─────────────┬─────────────────┐
│ (index) │ Severity │ Total found │ Total fixed │ Total remaining │
├─────────┼───────────┼─────────────┼─────────────┼─────────────────┤
│ 0 │ 'Error' │ 0 │ 0 │ 0 │
│ 1 │ 'Warning' │ 0 │ 0 │ 0 │
│ 2 │ 'Info' │ 0 │ 0 │ 0 │
└─────────┴───────────┴─────────────┴─────────────┴─────────────────┘
And indentation was not fixed to 2 spaces.
pipelineJob('qwe') {
description('123')
definition {
cpsScm {
scm {
git {
remote {
url('zxc')
credentials('asd')
}
branches('*/xcv')
scriptPath('cvb')
lightweight(true)
extensions { }
}
}
}
}
configure { project ->
scriptContainers.each { org_level ->
def script_level = org_level / 'script'
script_level.appendNode('cvb', [plugin: 'cvb']).with {
appendNode('xcv', 'true')
appendNode('cvb', script_level.script.text())
script_level.remove(script_level / 'zxc')
}
script_level.appendNode('sdf', [plugin: 'cvb']).with {
appendNode('xcv', 'true')
appendNode('cvb', script_level.fallbackScript.text())
script_level.remove(script_level / 'xcv')
}
}
}
}
npm-groovy-lint --fix
produces:
pipelineJob('qwe') {
description('123')
definition {
cpsScm {
scm {
git {
remote {
url('zxc')
credentials('asd')
}
branches('*/xcv')
scriptPath('cvb')
lightweight(true)
extensions { }
}
}
}
}
configure { project ->
scriptContainers.each { org_level ->
def script_level = org_level / 'script'
script_level.appendNode('cvb', [plugin: 'cvb']).with {
appendNode('xcv', 'true')
appendNode('cvb', script_level.script.text())
script_level.remove(script_level / 'zxc')
}
script_level.appendNode('sdf', [plugin: 'cvb']).with {
appendNode('xcv', 'true')
appendNode('cvb', script_level.fallbackScript.text())
script_level.remove(script_level / 'xcv')
}
}
}
}
As you can see first and second indentation levels were not changed, but third and deeper were changed.
When I run the container like this:
docker run -u "$(id -u):$(id -g)" -w=/tmp -v "$PWD":/tmp nvuillam/npm-groovy-lint --failon warning -f 'vars/*.groovy' -l warning
It ignores all arguments.
output is:
...
43 info The statement on line 43 in class None is at the incorrect indent level: Expected column 5 but was 3 Indentation
44 info The statement on line 44 in class None is at the incorrect indent level: Expected column 9 but was 5 Indentation
45 info The statement on line 45 in class None is at the incorrect indent level: Expected one of columns [13, 17, 21] but was 9 Indentation
67 info The statement on line 67 in class None is at the incorrect indent level: Expected column 5 but was 3 Indentation
npm-groovy-lint results in 8 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 0 │
│ 2 │ 'Info' │ 100 │
└─────────┴───────────┴─────────────┘
package.json not found, use default value {"name":"npm-groovy-lint","version":"0.0.0"} instead
Passing the command like this:
docker run -u "$(id -u):$(id -g)" -w=/tmp -v "$PWD":/tmp nvuillam/npm-groovy-lint npm-groovy-lint --failon warning -f 'vars/*.groovy' -l warning
Doesn't change anything... The only way to make it work is to pass the entrypoint to docker.
docker run -u "$(id -u):$(id -g)" -w=/tmp -v "$PWD":/tmp --entrypoint "npm-groovy-lint" nvuillam/npm-groovy-lint --failon warning -f 'vars/*.groovy' -l warning
GroovyLint: Started CodeNarc Server
/tmp/vars/bash.groovy
/tmp/vars/log.groovy
npm-groovy-lint results in 0 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 0 │
│ 2 │ 'Info' │ 0 │
└─────────┴───────────┴─────────────┘
package.json not found, use default value {"name":"npm-groovy-lint","version":"0.0.0"} instead
This could be an issue with my setup WSL2 or maybe I dont understand docker lol but I thought if the dockerfile had an entrypoint configured it would just read the arguments that you pass in?
Image I'm using:
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
nvuillam/npm-groovy-lint latest 4aa0fbe00c20 6 days ago 342MB
I'm trying to do the following:
$ uname -a
Darwin bluewhat.local 19.4.0 Darwin Kernel Version 19.4.0: Wed Mar 4 22:28:40 PST 2020; root:xnu-6153.101.6~15/RELEASE_X86_64 x86_64
$ npm --version
6.14.4
$ node --version
v14.2.0
$ npm install
...
$ npm run test
I'm getting lots of errors like this:
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
> [email protected] test /Users/docwhat/src/github.com/nvuillam/npm-groovy-lint
> mocha "test/**/*.test.js"
npm run test initialized
Errors
✓ (API:source) should trigger a parse options error
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/not/existing/path -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.4827945554814017.groovy -includes=**/*.groovy,**/Jenkinsfile -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.17527837038343175.xml",
"parse": false,
"file": null,
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
1) (API:source) should trigger a codenarc error
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
2) (API:source) should trigger a codenarc error (--noserver)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.6804313147967631.groovy -includes=**/codeNarcTmpDir_0.2548159772740064.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.6273769510745568.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.2548159772740064.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
3) (API:source) should trigger a fix function error
Lint with API
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/lib/example -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.4768275566059412.groovy -includes=**/SampleFileSmall.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.32288962981340474.xml",
"parse": false,
"file": null,
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
4) (API:file) should generate text console output
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/lib/example -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.506445844249817.groovy -includes=**/SampleFileSmall.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.09245345212892464.xml",
"parse": false,
"file": null,
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
5) (API:file) should generate json output with rules
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/lib/example -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.26903639120191136.groovy -includes=**/SampleFileSmall.groovy -report=html:ReportTestCodenarc.html",
"parse": false,
"file": null,
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
6) (API:file) should generate codenarc HTML file report
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/lib/example -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.449187890410526.groovy -includes=**/SampleFileSmall.groovy -report=xml:ReportTestCodenarc.xml",
"parse": false,
"file": null,
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
7) (API:file) should generate codenarc XML file report
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=jdeploy-bundle/lib/example -title=TestTitleCodenarc -maxPriority1Violations=0 -report=xml:./ReportTestCodenarc.xml",
"parse": false,
"file": null,
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
8) (API:file) should use --codenarcargs to generate XML report
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/lib/example -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.36341111882019717.groovy -includes=**/Jenkinsfile -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.32982772384088954.xml",
"parse": false,
"file": null,
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
9) (API:file) should run on a Jenkinsfile
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.011391168252150141 -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.78348047942399.groovy -includes=**/SampleFileSmall.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.634121704928567.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.011391168252150141/SampleFileSmall.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
10) (API:source) should run with source only (no parsing)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.12749198563054298 -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.5373526865026799.groovy -includes=**/SampleFileSmall.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.8685101827038071.xml",
"parse": true,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.12749198563054298/SampleFileSmall.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
11) (API:source) should run with source only (parse success)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.6923960329034664 -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.48553157754492293.groovy -includes=**/WithParseError.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.710375842085849.xml",
"parse": true,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.6923960329034664/WithParseError.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
12) (API:source) should run with source only (parse error)
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
13) (API:source) should run without CodeNarc Server
Lint with executable (jdeploy-bundle)
14) (EXE:file) should generate text console output
15) (EXE:file) should generate json console output
16) (EXE:file) should ignore node_modules pattern
17) (EXE:file) should generate codenarc HTML file report
18) (EXE:file) should generate codenarc XML file report
19) (EXE:file) should run on a Jenkinsfile
20) (EXE:help) should show npm-groovy-lint help
21) (EXE:help) should show codenarc help
/bin/sh: npm-groovy-lint: command not found
22) (EXE:file) failonerror
/bin/sh: npm-groovy-lint: command not found
23) (EXE:file) failonwarning
/bin/sh: npm-groovy-lint: command not found
24) (EXE:file) failoninfo
Check disabled rules
25) (API:source)GroovyDisableFileAll/*
26) (API:source)GroovyDisableFileAll//
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.6978086261893532.groovy -includes=**/codeNarcTmpDir_0.9648338535177372.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.45397927631541957.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.9648338535177372.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
27) (API:source)GroovyDisableFileIndentation/*
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.2470039939447597.groovy -includes=**/codeNarcTmpDir_0.9021092804117321.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.8158298773074923.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.9021092804117321.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
28) (API:source)GroovyDisableFileIndentation//
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.6820345168544737.groovy -includes=**/codeNarcTmpDir_0.289347487478663.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.1587245222929483.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.289347487478663.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
29) (API:source)GroovyDisableFileIndentationUnnecessarySemicolon
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.3018822074486762.groovy -includes=**/codeNarcTmpDir_0.8982569444043671.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.19113810002855813.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.8982569444043671.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
30) (API:source)GroovyDisableLineAll
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.888577074839324.groovy -includes=**/codeNarcTmpDir_0.06889670156898964.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.17750917359759688.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.06889670156898964.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
31) (API:source)GroovyDisableLineUnnecessarySemicolon
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.3647517891885115.groovy -includes=**/codeNarcTmpDir_0.7140694226942781.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.5504218820808009.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.7140694226942781.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
32) (API:source)GroovyDisableNextLineUnnecessarySemicolon
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.7545448868727254.groovy -includes=**/codeNarcTmpDir_0.04681907335918867.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.13104485503900554.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.04681907335918867.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
33) (API:source)GroovyDisableNextLineToIgnore
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.16090619461705735.groovy -includes=**/codeNarcTmpDir_0.9587437016120302.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.5669602516086298.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.9587437016120302.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
34) (API:source)GroovyDisableEnableAll
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.7483673963894075.groovy -includes=**/codeNarcTmpDir_0.5810547083769326.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.34244757750946286.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.5810547083769326.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
35) (API:source)GroovyDisableEnableIndentation
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.46379879043318084.groovy -includes=**/codeNarcTmpDir_0.12298357080004796.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.8425726585314668.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.12298357080004796.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
36) (API:source)GroovyDisableEnableIndentationUnnecessarySemicolon
Check rules auto-fixes
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.3216560090935574.groovy -includes=**/codeNarcTmpDir_0.6802648376557674.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.527706632680438.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.6802648376557674.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.8063891676329478.groovy -includes=**/codeNarcTmpDir_0.8362255695654699.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.7323376699479485.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.8362255695654699.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
37) BlockEndsWithBlankLine (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.516483533288258.groovy -includes=**/codeNarcTmpDir_0.8493754474428634.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.890373676388218.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.8493754474428634.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
38) BlockStartsWithBlankLine (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.6924300716641738.groovy -includes=**/codeNarcTmpDir_0.1363027418034044.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.2674238494692973.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.1363027418034044.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
39) BracesForClass (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.12425721241557763.groovy -includes=**/codeNarcTmpDir_0.31427391118404935.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.966957416475807.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.31427391118404935.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
40) BracesForClass (2)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.36320140647800514.groovy -includes=**/codeNarcTmpDir_0.5709213588311679.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.8003226529048673.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.5709213588311679.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
41) BracesForForLoop (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.0013995381271754148.groovy -includes=**/codeNarcTmpDir_0.8809271387855138.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.8137774698188891.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.8809271387855138.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
42) BracesForForLoop (2)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.8398105491133838.groovy -includes=**/codeNarcTmpDir_0.48067768431401237.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.7476615992326661.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.48067768431401237.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
43) BracesForIfElse (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.013165451972187103.groovy -includes=**/codeNarcTmpDir_0.4254804875079983.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.7762903762200404.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.4254804875079983.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
44) BracesForIfElse (2)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.7525104367318278.groovy -includes=**/codeNarcTmpDir_0.09293566000812037.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.3297480954862735.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.09293566000812037.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
45) BracesForIfElse (3)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.01963208198830313.groovy -includes=**/codeNarcTmpDir_0.5250152436382609.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.07806200562188148.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.5250152436382609.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
46) BracesForMethod (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.5730981121829268.groovy -includes=**/codeNarcTmpDir_0.9133588071793926.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.3274010609454543.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.9133588071793926.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
47) BracesForMethod (2)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.8111108232018007.groovy -includes=**/codeNarcTmpDir_0.1327959152850573.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.9916724057481296.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.1327959152850573.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
48) BracesForTryCatchFinally (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.3321724740144396.groovy -includes=**/codeNarcTmpDir_0.017913605521572062.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.7340063948563669.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.017913605521572062.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
49) ClassEndsWithBlankLine (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.35301779288879365.groovy -includes=**/codeNarcTmpDir_0.00034069222000732147.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.7189973454680179.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.00034069222000732147.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
50) ClassStartsWithBlankLine (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.34045809114408354.groovy -includes=**/codeNarcTmpDir_0.5965545750092927.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.19943892795984808.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.5965545750092927.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
51) ConsecutiveBlankLines (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.8790850762058329.groovy -includes=**/codeNarcTmpDir_0.7827146856468539.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.24959064586708601.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.7827146856468539.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
52) ConsecutiveBlankLines (2)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.5235330244807661.groovy -includes=**/codeNarcTmpDir_0.9087170615372673.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.18442931844237775.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.9087170615372673.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
53) ElseBlockBraces (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.7896980490554364.groovy -includes=**/codeNarcTmpDir_0.7272197097113815.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.17117933734132929.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.7272197097113815.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
54) ElseBlockBraces (2)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.6661460527187204.groovy -includes=**/codeNarcTmpDir_0.6025097946506579.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.9064712341514607.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.6025097946506579.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
55) ElseBlockBraces (3)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.21368909713928752.groovy -includes=**/codeNarcTmpDir_0.8101647560836787.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.7156683573936622.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.8101647560836787.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
56) ElseBlockBraces (4)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.820695887108915.groovy -includes=**/codeNarcTmpDir_0.43999206327373264.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.4397122646530178.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.43999206327373264.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
57) ExplicitArrayListInstantiation (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.7994957663783333.groovy -includes=**/codeNarcTmpDir_0.9397215973207362.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.26506561035252063.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.9397215973207362.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
58) ExplicitArrayListInstantiation (2)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.9875173635155075.groovy -includes=**/codeNarcTmpDir_0.692705183358953.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.5557157713257443.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.692705183358953.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
59) FileEndsWithoutNewline (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.43052534567552225.groovy -includes=**/codeNarcTmpDir_0.732770178977215.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.8995483163318847.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.732770178977215.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
60) IfStatementBraces (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.3543896344152211.groovy -includes=**/codeNarcTmpDir_0.01606101374446056.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.38805022740184336.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.01606101374446056.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
61) IfStatementBraces (2)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.5339788804649894.groovy -includes=**/codeNarcTmpDir_0.4132171050414488.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.5616590300103175.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.4132171050414488.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
62) IfStatementBraces (3)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.821841370391861.groovy -includes=**/codeNarcTmpDir_0.2715787007402408.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.7557229206820029.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.2715787007402408.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
63) IfStatementBraces (4)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.13121478143765875.groovy -includes=**/codeNarcTmpDir_0.7397937394856233.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.7802443929431542.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.7397937394856233.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
64) Indentation (1)
CodeNarcServer http call unexpected error:
{
"name": "RequestError",
"message": "Error: connect ETIMEDOUT 192.168.9.136:7484",
"cause": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"error": {
"errno": -60,
"code": "ETIMEDOUT",
"syscall": "connect",
"address": "192.168.9.136",
"port": 7484
},
"options": {
"method": "POST",
"uri": "http://192.168.9.136:7484/request",
"body": {
"codeNarcArgs": "-basedir=/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint -rulesetfiles=file:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpRs_0.9963124964592787.groovy -includes=**/codeNarcTmpDir_0.7607659273356786.groovy -report=xml:/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcReportXml_0.0020671176184599016.xml",
"parse": false,
"file": "/var/folders/wq/4zytjdrx2l7f5xf6vl7k56340000gn/T/npm-groovy-lint/codeNarcTmpDir_0.7607659273356786.groovy",
"requestKey": null
},
"json": true,
"simple": true,
"resolveWithFullResponse": false,
"transform2xxOnly": false
}
}
GroovyLint: Error running CodeNarc:
internal/modules/cjs/loader.js:1023
throw err;
^
Error: Cannot find module '/Users/docwhat/src/github.com/nvuillam/npm-groovy-lint/jdeploy-bundle/originaljdeployPlanB.js'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1020:15)
at Function.Module._load (internal/modules/cjs/loader.js:890:27)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
^C
This one's a bit hard to explain, but the project I'm working with has 10 top-level .gradle
files. Excuse the unconfigured errors here, I'm just starting to test using this module...
node_modules/.bin/npm-groovy-lint --verbose
(no -f
flag) results in all files being recognized and successfully linted.node_modules/.bin/npm-groovy-lint -f "*.gradle" --verbose
results in all the matching files being recognized, but no linting is performed and the file count stays at 0.Is there another command-line arg I'm missing to make it work through the files?
[root@05554c862991 DataServices_DataHub]# node_modules/.bin/npm-groovy-lint --verbose
....
/mnt2/DataServices_DataHub/referenceDataTasks.gradle
1 info Wildcard (star) import NoWildcardImports
2 info The [com.marklogic.client.io.JacksonHandle] import is never referenced UnusedImport
....
/mnt2/DataServices_DataHub/testBuild.gradle
0 info The tab character is not allowed in source files NoTabCharacter
1 info Wildcard (star) import NoWildcardImports
....
npm-groovy-lint results in 31 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 3 │
│ 1 │ 'Warning' │ 2703 │
│ 2 │ 'Info' │ 9951 │
└─────────┴───────────┴─────────────┘
[root@05554c862991 DataServices_DataHub]# node_modules/.bin/npm-groovy-lint -f "*.gradle" --verbose
....
/mnt2/DataServices_DataHub/referenceDataTasks.gradle
/mnt2/DataServices_DataHub/testBuild.gradle
npm-groovy-lint results in 0 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 0 │
│ 2 │ 'Info' │ 0 │
└─────────┴───────────┴─────────────┘
I have a file Jenkinsfile
pipeline {
stages {
stage('CleanWorkspace') {
steps {
cleanWs()
dir("../${JOB_NAME}@2"){
deleteDir()
}
}
}
}
}
$ npm-groovy-lint
6 info The opening brace for the closure in class None is not preceded by a space or whitespace SpaceBeforeOpeningBrace
and after npm-groovy-lint --fix
it becomes
pipeline {
stages {
stage('CleanWorkspace') {
steps {
cleanWs()
dir("../$ {JOB_NAME}@2"){
deleteDir()
}
}
}
}
}
$ npm-groovy-lint --fix
npm-groovy-lint results in linted files:
┌─────────┬───────────┬─────────────┬─────────────┬─────────────────┐
│ (index) │ Severity │ Total found │ Total fixed │ Total remaining │
├─────────┼───────────┼─────────────┼─────────────┼─────────────────┤
│ 0 │ 'Error' │ 0 │ 0 │ 0 │
│ 1 │ 'Warning' │ 0 │ 0 │ 0 │
│ 2 │ 'Info' │ 1 │ 1 │ 0 │
└─────────┴───────────┴─────────────┴─────────────┴─────────────────┘
which obviously breaks string content.
My .groovylint.json:
{
"extends": "recommended-jenkinsfile",
"rules": {
"ClassJavadoc": "off",
"DuplicateNumberLiteral": "off",
"DuplicateStringLiteral": "off",
"formatting.Indentation": {
"severity": "error",
"spacesPerIndentLevel": 2
}
}
}
$ npm-groovy-lint --version
GroovyLint: Successfully processed CodeNarc:
CodeNarc version 1.6.1
npm-groovy-lint version 7.4.4
Embeds:
CodeNarc version 1.6.1
- Groovy version 3.0.5 (superlite)
$ node -v
v12.13.1
It doesn't look like syntax errors are caught. If I have the following code below:
pipeline {
agent any
and changed it to something which is an error:
pipeline_asdasd_dasdasdasd_asdasdas {
agent any
It doesn't seem to catch it as an error (it doesn't catch it at all) when it is.
Hi,
this is may groovy file:
pipeline {
agent none
options {
timestamps()
ansiColor('xterm')
}
stages {
stage('stuff') {
steps {
sh 'echo "stuff"'
}
}
}
}
and this is my .groovylintrc.json
configuration:
{
"extends": "recommended-jenkinsfile",
"rules": {
"Indentation": {
"spacesPerIndentLevel": 2
}
}
}
as you can see the groovy file is correct and if I analyze the file it doesn't report any error
➜ npm-groovy-lint
npm-groovy-lint results in linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 0 │
│ 2 │ 'Info' │ 0 │
└─────────┴───────────┴─────────────┘
but if I try to automatically format it will indent everything with four spaces instant of two
➜ npm-groovy-lint --format
/home/b1zzu/Projects/gitlab.cee.redhat.com/integreatly-qe/ci-cd/stuff/test.groovy
npm-groovy-lint results in linted files:
┌─────────┬───────────┬─────────────┬─────────────┬─────────────────┐
│ (index) │ Severity │ Total found │ Total fixed │ Total remaining │
├─────────┼───────────┼─────────────┼─────────────┼─────────────────┤
│ 0 │ 'Error' │ 0 │ 0 │ 0 │
│ 1 │ 'Warning' │ 0 │ 0 │ 0 │
│ 2 │ 'Info' │ 8 │ 8 │ 0 │
└─────────┴───────────┴─────────────┴─────────────┴─────────────────┘
and if I analyze again the modified it will show indentation problems:
➜ npm-groovy-lint
/home/b1zzu/Projects/gitlab.cee.redhat.com/integreatly-qe/ci-cd/stuff/test.groovy
2 info The statement on line 2 in class None is at the incorrect indent level: Expected column 3 but was 5 Indentation
3 info The statement on line 3 in class None is at the incorrect indent level: Expected column 3 but was 5 Indentation
4 info The statement on line 4 in class None is at the incorrect indent level: Expected column 5 but was 9 Indentation
5 info The statement on line 5 in class None is at the incorrect indent level: Expected column 5 but was 9 Indentation
7 info The statement on line 7 in class None is at the incorrect indent level: Expected column 3 but was 5 Indentation
8 info The statement on line 8 in class None is at the incorrect indent level: Expected column 5 but was 9 Indentation
9 info The statement on line 9 in class None is at the incorrect indent level: Expected column 7 but was 13 Indentation
10 info The statement on line 10 in class None is at the incorrect indent level: Expected column 9 but was 17 Indentation
npm-groovy-lint results in linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 0 │
│ 2 │ 'Info' │ 8 │
└─────────┴───────────┴─────────────┘
I would like to have a set of default rules at ~/.groovylintrc.json
as there are certain rules which don't work with Jenkinsfiles too well in their default format, but I don't want to modify each repo with the same rules either.
Is it possible to leverage my existing codenarc.xml file to define the rules being used?
Since it seems likely there are other solutions, my desire is to have both:
I'm currently using the ru.vyarus.quality
plugin, but could definitely swap that out if there's something that can work with npm-groovy-lint and use the same rule configuration.
Codenarc has native gradle-support which makes it simple to integrate into the build, npm-groovy-lint has vscode support and otherwise superior user experience in command line reporting.
However the .groovylintrc.json
file isn't compatible with CodeNarc.
Integrating npm-groovy-lint to the build process is not necessarily a huge issue, but it requires creating a custom docker-image (i couldn't see one directly available in dockerhub) and some extra logic. CodeNarc is a bit more straightforward as you can call it from Gradle.
I would like to be able to share the rules of CodeNarc with npm-groovy-lint so that i don't have to maintain them in two different files for both tools.
I can use a groovy rule set file directly with codenarc as configuration, npm-groovy-lint appears to have support for CodeNarc configuration files based on the help text.
-r, --rulesets String
RuleSet file(s) to use for linting. If it is a directory, all rulesets will be used. RuleSet file definition:
http://codenarc.github.io/CodeNarc/codenarc-creating-ruleset.html. If not specified, npm-groovy-script default one will be used. Can also be a list of rule identifiers with parameters
But when I try to pass the same file as a codenarc config file for npm-groovy-lint as a codenarc parameter it just fails.
I had to remove that .txt from the end to get npm-groovy-lint to react to it, but when I run
npm-groovy-lint -r StarterRuleSet-AllRulesByCategory.groovy
GroovyLint: Error running CodeNarc:
java.lang.AssertionError: No such rule named [ImplicitReturnStatement]. . Expression: ruleClass. Values: ruleClass = null
at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:436)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670)
at org.codenarc.ruleset.TopLevelDelegate.propertyMissing(RuleSetBuilder.groovy:105)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
then I tried commenting out that ImplicitReturnStatement rule, i get
GroovyLint: Error running CodeNarc:
java.lang.AssertionError: No such rule named [rules]. . Expression: ruleClass. Values: ruleClass = null
at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:436)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:670)
at org.codenarc.ruleset.TopLevelDelegate.methodMissing(RuleSetBuilder.groovy:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Having the npm-groovy-lint (and the VSCode plugin) rule configuration be directly compatible and usable with CodeNarc could also solve the problem so I wouldn't have to make a choice between the two: use one for development / IDE integration and then run codenarc in CI.
Hi @nvuillam,
I'm reaching out as a contributor to the nf-core project. We develop state-of-the art Bioinformatics pipelines in nextflow. We are highly interested in linting (or rather autoformatting) our pipelines, and I was thrilled to find out that
npm-groovy-lint
already can handle the Groovy parts in .nf
files.
It would be amazing if npm-groovy-lint could be improved on the nextflow parts (see some non-exhaustive examples in the comments in the code below). We might be able to work on it during one of our next hackathons.
How complicated do you think it would be to improve the nextflow support? And if we were ready to tackle it, could you provide us some guidance where to start?
Best regards,
Gregor
include { initOptions; saveFiles; getSoftwareName } from './functions'
params.options = [:]
def options = initOptions(params.options)
// -> automatically and consitently wrap channel transformations , should they get too long
someChannel = someOtherChannel. splitCsv(header:true, sep:',').map {
check_samplesheet_paths(it)
}
process FASTQC {
tag "$meta.id"
label 'process_medium'
// -> automatically wrap lines; indent 'mode' and 'saveAs', which are options for publishDir
publishDir "${params.outdir}",
mode: params.publish_dir_mode,
saveAs: { filename -> saveFiles(filename:filename, options:params.options, publish_dir:getSoftwareName(task.process), publish_id:meta.id) }
conda (params.enable_conda ? 'bioconda::fastqc=0.11.9' : null)
// -> wrap lines, indent if
if (workflow.containerEngine == 'singularity' && !params.singularity_pull_docker_container) { container 'https://depot.galaxyproject.org/singularity/fastqc:0.11.9--0' } else { container 'quay.io/biocontainers/fastqc:0.11.9--0' }
// -> consistently indent input and output channels
input:
tuple val(meta), path(reads)
output:
tuple val(meta), path('*.html'), emit: html
tuple val(meta), path('*.zip'), emit: zip
path '*.version.txt' , emit: version
script:
def software = getSoftwareName(task.process)
def prefix = options.suffix ? "${meta.id}.${options.suffix}" : "${meta.id}"
if (meta.single_end) {
"""
[ ! -f ${prefix}.fastq.gz ] && ln -s $reads ${prefix}.fastq.gz
fastqc $options.args --threads $task.cpus ${prefix}.fastq.gz
fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt
"""
} else {
"""
[ ! -f ${prefix}_1.fastq.gz ] && ln -s ${reads[0]} ${prefix}_1.fastq.gz
[ ! -f ${prefix}_2.fastq.gz ] && ln -s ${reads[1]} ${prefix}_2.fastq.gz
fastqc $options.args --threads $task.cpus ${prefix}_1.fastq.gz ${prefix}_2.fastq.gz
fastqc --version | sed -e "s/FastQC v//g" > ${software}.version.txt
"""
}
}
node_modules/.bin/npm-groovy-lint -f "*.gradle" -v
Per the README, this should run verbosely, but instead I'm getting the following error:
Parse options error: The options --files and --version are mutually exclusive - you cannot use them at the same time.
Running --verbose
doesn't fail, but doesn't result in different output. I'm not able to get this library to run on any files with the above command, at the moment, but I don't know if that's my fault yet...
Hi there, thanks for the tool.
I'm using:
[email protected]
[email protected]
[email protected]
I have an assortment of declarative pipeline files.
I have made a .groovylintrc.json
file at the root of my project with the following contents:
{
"extends": "recommended-jenkinsfile",
"rules": {
"formatting.Indentation": {
"spacesPerIndentLevel": 2,
"severity": "warning"
}
}
}
When running npm-groovy-lint --files "**/*Jenkinsfile" --fix
I get a mix of output.
Some of my files are flagged for normal things (expected, as I just began using this tool) like line length, etc. However, some of my files are tagged with things like
error Unexpected input: '{' @ line 1, column 10. NglParseError
(they all reference column 10)
The file in question begins with
pipeline {
....
}
as a declarative pipeline ought to.
Oddly enough, not all of my declarative pipelines are so flagged - some do not error at all. I am unclear as to the cause of this.
If we have company proxy i am unable to execute npm install -g npm-groovy-lint due to proxy settings. I have tried to perform npm config set proxy to my proxy and also npm config set registry http://registry.npmjs.org/. But none of them yeilded positive results
npm-groovy-lint 6.0.0 is using CodeNarc v1.6.1 which support Java 14.
but I install failed.
npm i npm-groovy-lint
grep groovy package-lock.json
"npm-groovy-lint": {
"resolved": "https://.../npm-groovy-lint/download/npm-groovy-lint-6.0.0.tgz"
node ./node_modules/npm-groovy-lint/lib/index.js
Java between 1.8 and 11.99 is required (14.02 found)
Installing/Updating JRE in /Users/sinkcup/.java-caller...
Unexpected error: Command failed: npm install node-jre --save
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
It would be a nice feature if .groovylintrc.json
could be defined with a json schema file provided in this repository.
{
"$schema": "./node_modules/npm-groovy-lint/groovylintrc.schema.json",
OR
"$schema": "https://raw.githubusercontent.com/nvuillam/npm-groovy-lint/master/groovylintrc.schema.json",
"extends": "recommended-jenkinsfile",
"rules": {
"DuplicateMapLiteral": "off",
"DuplicateNumberLiteral": "off",
"DuplicateStringLiteral": "off"
}
}
This brings intelliSense to most of the code editors out there.
References: json schema of .eslintrc | vscode docs
the docs say:
extends: Name of a base configuration (recommended, recommended-jenkinsfile, all)
but my project has two files: Jenkinsfile
and build.gradle
, if I choose recommended-jenkinsfile
, how can I lint the groovy file build.gradle
?
I've been trying to lint some of our files and one of the errors I'm getting is the spaceAroundMapEntryColon
Rule. Checked codenarc so I could configure it but regex isn't allowed in a json file (also tried and see if escaping it works but it doesn't. So if my config is like the one below:
{
"extends": "recommended",
"rules": {
"comments.ClassJavadoc": "off",
"formatting.Indentation": {
"spacesPerIndentLevel": 2,
"severity": "info"
},
"formatting.SpaceAroundMapEntryColon": {
"characterBeforeColonRegex": "\s"
}
}
}
I get:
Parse options error: Cannot read config file: /home/pjhrobles/gaf/.groovylintrc.json Error: Unexpected token s in JSON at position 296
As mentioned above, I tried escaping but it doesn't work.
Is there anyway to override or do I have to use --codenarcargs
or --rulesets
?
The instructions for the -x option are as follows
-x, --fixrules String List of rule identifiers to fix (if not specified, all available fixes will be applied) - default: all
However I haven't been able to successfully execute this command. I've tried specifying some of the rules that --fix option handles without issues, such as UnnecessaryDefInMethodDeclaration
Running
npm-groovy-lint -x UnnecessaryDefInMethodDeclaration
results in:
Parse options error: The option 'fixrules' did not have its dependencies met.
The default also is "all", but without any params I get the same error, also if i provide -x all
, i still get the same error.
I'd like to run fixes one rule at a time so I can make clean commits.
My Groovy code is beyond awful, but luckily for me, you wrote this extension! Version 1.2.8 works fine (despite the ERROR message):
[1022/152746.931:ERROR:registration_protocol_win.cc(103)] CreateFile: The system cannot find the file specified. (0x2)
Start analyzing file:///c%3A/Yoyodyne/Skunkr/src/com/yoyodyne/Context.groovy
GroovyLint: Started CodeNarc Server
Completed analyzing file:///c%3A/Yoyodyne/Skunkr/src/com/yoyodyne/Context.groovy in 13606 ms
But unfortunately if I update to 1.2.9, then it fails:
[1022/152947.454:ERROR:registration_protocol_win.cc(103)] CreateFile: The system cannot find the file specified. (0x2)
Start analyzing file:///c%3A/Yoyodyne/Skunkr/src/com/yoyodyne/Context.groovy
Unable to run java command: {"status":1,"stdout":"","stderr":"","childJavaProcess":{"_events":{},"_eventsCount":2,"_closesNeeded":1,"_closesGot":1,"connected":false,"signalCode":null,"exitCode":1,"killed":false,"spawnfile":"java","_handle":null,"spawnargs":["java","-Xms256m","-Xmx2048m","-cp","\"c:\\Users\\kushc\\.vscode\\extensions\\nicolasvuillamy.vscode-groovy-lint-1.2.9\\server\\node_modules\\npm-groovy-lint\\lib\\java\\CodeNarcServer.jar;c:\\Users\\kushc\\.vscode\\extensions\\nicolasvuillamy.vscode-groovy-lint-1.2.9\\server\\node_modules\\npm-groovy-lint\\lib\\java\\*\"","com.nvuillam.CodeNarcServer","--server"],"pid":13716,"stdin":null,"stdout":null,"stderr":null,"stdio":[null,null,null]}}
GroovyLint: Error running CodeNarc:
===========================================================================
===========================================================================
npm-groovy-lint error: Fatal error while calling CodeNarc
Reason: unknown
undefined
If you still have an error, post an issue to get help: https://github.com/nvuillam/vscode-groovy-lint/issues
===========================================================================
===========================================================================
My VS Code version info:
Version: 1.50.1 (user setup)
Commit: d2e414d9e4239a252d1ab117bd7067f125afd80a
Date: 2020-10-13T15:06:15.712Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.19041
Windows 10
node
$ node -v
v12.17.0
.groovylintrc.json
{
"extends": "recommended",
"rules": {
"LineLength": {
"enabled": false
}
}
}
$ npm-groovy-lint -p . -f "**/*.groovy" -o "./lintResults.html" -l "info" --failon "error" -c .groovylintrc.json
Unable to run java command: {"status":1,"stdout":"","stderr":"","childJavaProcess":{"_events":{},"_eventsCount":2,"_closesNeeded":1,"_closesGot":1,"connected":false,"signalCode":null,"exitCode":1,"killed":false,"spawnfile":"java","_handle":null,"spawnargs":["java","-Xms256m","-Xmx2048m","-cp","\"C:\\Users\\clif.molina\\AppData\\Roaming\\npm\\node_modules\\npm-groovy-lint\\lib\\java\\CodeNarcServer.jar;C:\\Users\\clif.molina\\AppData\\Roaming\\npm\\node_modules\\npm-groovy-lint\\lib\\java\\*\"","com.nvuillam.CodeNarcServer","--server"],"pid":21728,"stdin":null,"stdout":null,"stderr":null,"stdio":[null,null,null]}}
GroovyLint: Error running CodeNarc:
Unexpected error: Cannot read property 'totalFoundErrorNumber' of undefined
TypeError: Cannot read property 'totalFoundErrorNumber' of undefined
at NpmGroovyLint.manageReturnCode (C:\Users\clif.molina\AppData\Roaming\npm\node_modules\npm-groovy-lint\lib\groovy-lint.js:482:49)
at NpmGroovyLint.postProcess (C:\Users\clif.molina\AppData\Roaming\npm\node_modules\npm-groovy-lint\lib\groovy-lint.js:331:14)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async NpmGroovyLint.run (C:\Users\clif.molina\AppData\Roaming\npm\node_modules\npm-groovy-lint\lib\groovy-lint.js:69:13)
at async C:\Users\clif.molina\AppData\Roaming\npm\node_modules\npm-groovy-lint\lib\index.js:12:9
###Update
I saw the issue saying memory allocation was the java error. After fresh boot, it looks like:
$ npm-groovy-lint -p . -f "**/*.groovy" -o "./lintResults.html" -l "info" --failon "error" -c .groovylintrc.json
GroovyLint: Successfully processed CodeNarc:
CodeNarc completed: (p1=5; p2=42; p3=1012) 4035ms
Unexpected error: Cannot read property 'totalFoundErrorNumber' of undefined
TypeError: Cannot read property 'totalFoundErrorNumber' of undefined
at NpmGroovyLint.manageReturnCode (C:\Users\clif.molina\AppData\Roaming\npm\node_modules\npm-groovy-lint\lib\groovy-lint.js:482:49)
at NpmGroovyLint.postProcess (C:\Users\clif.molina\AppData\Roaming\npm\node_modules\npm-groovy-lint\lib\groovy-lint.js:331:14)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async NpmGroovyLint.run (C:\Users\clif.molina\AppData\Roaming\npm\node_modules\npm-groovy-lint\lib\groovy-lint.js:69:13)
at async C:\Users\clif.molina\AppData\Roaming\npm\node_modules\npm-groovy-lint\lib\index.js:12:9
###update 2
Installed Java 64-bit...
Stepping through with debugger:
groovy-lint.js:252 this.setMethodResult(serverCallResult);
serverCallResult.codeNarcStdErr: undefined
serverCallResult.codeNarcJsonResult.err: "Unable to parse CodeNarc completed: (p1=5; p2=42; p3=1012) 1606ms\r\n"
serverCallResult.codeNarcStdOut: 'CodeNarc completed: (p1=5; p2=42; p3=1012) 1606ms\r\n'
Update 3:
Tracking it to codenarc-caller.js:353 return JSON.parse(jsonLine);
The output lines are not JSON and getCodeNarcJsonResult. There are two lines in the response, 'CodeNarc completed: (p1=5; p2=42; p3=1012) 1606ms\r\n'
and a blank line.
I see where your PR was accepted to add JSON output format to CodeNarc. I see v1.6.1 of CodeNarc is contained in this package.
--fix
command is cool because it autofixes most issues in the codebase, however it also alters whitespaces / indentation even when i have specifically ignored those in the .groovylintrc.json
I am getting an error when running the following command:
npm-groovy-lint --noserver --failon warning --path ./ --output ./linting.txt --loglevel warning
Here is my configuration:
{
"extends": "recommended",
"rules": {
"BuilderMethodWithSideEffects": "off",
"CatchException": "off",
"CompileStatic": "off",
"DuplicateListLiteral": "off",
"DuplicateMapLiteral": "off",
"DuplicateNumberLiteral": "off",
"DuplicateStringLiteral": "off",
"FactoryMethodName": "off",
"GStringAsMapKey": "off",
"GStringExpressionWithinString": "off",
"GrailsMassAssignment": "off",
"ImplicitClosureParameter": "off",
"Instanceof": "off",
"JUnitPublicNonTestMethod": "off",
"JUnitPublicProperty": "off",
"JavaIoPackageAccess": "off",
"LineLength": "off",
"LoggerWithWrongModifiers": "off",
"MethodCount": "off",
"MethodName": "off",
"NestedBlockDepth": "off",
"NoFloat": "off",
"NonFinalPublicField": "off",
"ParameterCount": "off",
"PrintStackTrace": "off",
"PublicInstanceField": "off",
"ReturnNullFromCatchBlock": "off",
"ThrowError": "off",
"UnnecessaryGString": "off",
"UnnecessaryToString": "off",
"Indentation": {
"spacesPerIndentLevel": 4,
"severity": "warning"
},
"AssignmentInConditional": "warning",
"BlankLineBeforePackage": "warning",
"BlockEndsWithBlankLine": "warning",
"BlockStartsWithBlankLine": "warning",
"BracesForClass": "warning",
"BracesForForLoop": "warning",
"BracesForIfElse": "warning",
"BracesForMethod": "warning",
"BracesForTryCatchFinally": "warning",
"ClassEndsWithBlankLine": "warning",
"ClassStartsWithBlankLine": "warning",
"ClosingBraceNotAlone": "warning",
"ConsecutiveBlankLines": "warning",
"DuplicateImport": "warning",
"ElseBlockBraces": "warning",
"ExplicitArrayListInstantiation": "warning",
"ExplicitLinkedListInstantiation": "warning",
"FileEndsWithoutNewline": "warning",
"IfStatementBraces": "warning",
"IndentationClosingBraces": "warning",
"IndentationComments": "warning",
"InsecureRandom": "warning",
"MisorderedStaticImports": "warning",
"MissingBlankLineAfterImports": "warning",
"MissingBlankLineAfterPackage": "warning",
"NoTabCharacter": "warning",
"SpaceAfterCatch": "warning",
"SpaceAfterComma": "warning",
"SpaceAfterFor": "warning",
"SpaceAfterIf": "warning",
"SpaceAfterOpeningBrace": "warning",
"SpaceAfterSemicolon": "warning",
"SpaceAfterSwitch": "warning",
"SpaceAfterWhile": "warning",
"SpaceAroundOperator": "warning",
"SpaceBeforeClosingBrace": "warning",
"SpaceBeforeOpeningBrace": "warning",
"TrailingWhitespace": "warning",
"UnnecessaryDefInFieldDeclaration": "warning",
"UnnecessaryDefInMethodDeclaration": "warning",
"UnnecessaryDefInVariableDeclaration": "warning",
"UnnecessaryDotClass": "warning",
"UnnecessaryFinalOnPrivateMethod": "warning",
"UnnecessaryGroovyImport": "warning",
"UnnecessaryInstantiationToGetClass": "warning",
"UnnecessaryPackageReference": "warning",
"UnnecessaryParenthesesForMethodCallWithClosure": "warning",
"UnnecessarySemicolon": "warning",
"UnusedImport": "warning"
}
}
If I run npm-groovy-lint
, I get an error:
$ npm-groovy-lint --noserver --failon warning --path ./ --output ./linting.txt --loglevel warning
GroovyLint: Error running CodeNarc:
java.lang.NullPointerException: Cannot get property 'name' on null object
at org.codehaus.groovy.runtime.NullObject.getProperty(NullObject.java:60)
at org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:194)
at org.codehaus.groovy.runtime.callsite.NullCallSite.getProperty(NullCallSite.java:46)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
at org.codenarc.ruleset.JsonReaderRuleSet$_loadRuleElements_closure1.doCall(JsonReaderRuleSet.groovy:64)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:263)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1026)
at groovy.lang.Closure.call(Closure.java:412)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:5947)
at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2395)
at org.codehaus.groovy.runtime.dgm$201.invoke(Unknown Source)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:247)
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
at org.codenarc.ruleset.JsonReaderRuleSet.loadRuleElements(JsonReaderRuleSet.groovy:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:193)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:61)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:185)
at org.codenarc.ruleset.JsonReaderRuleSet.<init>(JsonReaderRuleSet.groovy:43)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:72)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:263)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:277)
at org.codenarc.ruleset.RuleSetUtil.loadRuleSetFromString(RuleSetUtil.groovy:42)
at org.codenarc.ruleset.RuleSetUtil$loadRuleSetFromString.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
at org.codenarc.CodeNarcRunner.createInitialRuleSetFromString(CodeNarcRunner.groovy:173)
at org.codenarc.CodeNarcRunner.createInitialRuleSet(CodeNarcRunner.groovy:168)
at org.codenarc.CodeNarcRunner.buildRuleSet(CodeNarcRunner.groovy:132)
at org.codenarc.CodeNarcRunner.execute(CodeNarcRunner.groovy:87)
at org.codenarc.CodeNarcRunner$execute.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)
at org.codenarc.CodeNarc.execute(CodeNarc.groovy:186)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:193)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:73)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
at org.codenarc.CodeNarc.main(CodeNarc.groovy:156)
Unexpected error: Cannot read property 'totalFoundErrorNumber' of undefined
TypeError: Cannot read property 'totalFoundErrorNumber' of undefined
at NpmGroovyLint.manageReturnCode (/home/wlaw/.npm/lib/node_modules/npm-groovy-lint/lib/groovy-lint.js:481:49)
at NpmGroovyLint.postProcess (/home/wlaw/.npm/lib/node_modules/npm-groovy-lint/lib/groovy-lint.js:330:14)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async NpmGroovyLint.run (/home/wlaw/.npm/lib/node_modules/npm-groovy-lint/lib/groovy-lint.js:68:13)
at async /home/wlaw/.npm/lib/node_modules/npm-groovy-lint/lib/index.js:12:9
If I shorten the config file to this, it works:
{
"extends": "recommended",
"rules": {
"BuilderMethodWithSideEffects": "off",
"CatchException": "off",
"CompileStatic": "off",
"DuplicateListLiteral": "off",
"DuplicateMapLiteral": "off",
"DuplicateNumberLiteral": "off",
"DuplicateStringLiteral": "off",
"FactoryMethodName": "off",
"GStringAsMapKey": "off",
"GStringExpressionWithinString": "off",
"GrailsMassAssignment": "off",
"ImplicitClosureParameter": "off",
"Instanceof": "off",
"JUnitPublicNonTestMethod": "off",
"JUnitPublicProperty": "off",
"JavaIoPackageAccess": "off",
"LineLength": "off",
"LoggerWithWrongModifiers": "off",
"MethodCount": "off",
"MethodName": "off",
"NestedBlockDepth": "off",
"NoFloat": "off",
"NonFinalPublicField": "off",
"ParameterCount": "off",
"PrintStackTrace": "off",
"PublicInstanceField": "off",
"ReturnNullFromCatchBlock": "off",
"ThrowError": "off",
"UnnecessaryGString": "off",
"UnnecessaryToString": "off",
"Indentation": {
"spacesPerIndentLevel": 4,
"severity": "warning"
},
"AssignmentInConditional": "warning",
"BlankLineBeforePackage": "warning",
"BlockEndsWithBlankLine": "warning",
"BlockStartsWithBlankLine": "warning",
"BracesForClass": "warning",
"BracesForForLoop": "warning",
"BracesForIfElse": "warning",
"BracesForMethod": "warning",
"BracesForTryCatchFinally": "warning",
"ClassEndsWithBlankLine": "warning",
"ClassStartsWithBlankLine": "warning"
}
}
Basically I want all auto-fixable rules to throw a warning (so that they would fail a CI run). But it seems like there are issues when I set all of them to warning.
I have a requirement of linting defined methods in groovy. The methods are not called in the script being linted.
And as i was testing for how an error is treated by the npm-grovy-lint i saw that it isnt catching the Empty if statement error if its in the method.
Could you tell me how to lint methods that are not called as well?
Tried latest version as well as version 2.2.0 which requires Node.js 8+.
$ npm-groovy-lint
/usr/local/lib/node_modules/npm-groovy-lint/jdeploy-bundle/groovy-lint.js:16
"use strict";
^
SyntaxError: Unexpected token ;
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
Points to https://github.com/nvuillam/npm-groovy-lint/blob/v2.2.0/src/groovy-lint.js#L16 (2.2.0) and https://github.com/nvuillam/npm-groovy-lint/blob/master/lib/groovy-lint.js#L18 on latest version.
Node.js: 10.14.2
npm: 6.15.5
OS: Macos 10.15.6
If I have an if else
block with 2 space indentation, and I run npm-groovy-lint
to fix it to 4 spaces, the } else {
is not corrected, but everything else is.
This:
private String test() {
if (true) {
print("hello")
} else {
print("world")
}
}
... gets changed to this:
private String test() {
if (true) {
print("hello")
} else {
print("world")
}
}
I would like to set something like this in the configuration:
{
"files": {
"**/*.groovy": {
"extends": "recommended"
},
"**/*.Jenkinsfile": {
"extends": "recommended-jenkinsfile"
}
}
}
So I could set which rule to use against different patterns of files.
This is also another possible solution for #79.
I'm working primarily on linux and i've noticed when running --fix for indentation every file has LF line-endings turned to CRLF. The tool shouldn't mess with the file formatting this way.
Example config
{
"extends": "recommended-jenkinsfile",
"rules": {
"formatting.Indentation": {
"spacesPerIndentLevel": 2,
"severity": "error"
}
}
}
Example code
pipeline {
agent any
stages {
stage('Intall JQ') {
steps {
script {
sh 'apt update; apt install jq=1.5+dfsg-2+b1 -y'
}
}
}
}
}
Running with --fix
does nothing to the file, nor are errors flagged with incorrect spacing in file.
If a line has less than the required spaces for the indent level, it will be fixed.
pipeline {
agent any // <- this will be fixed
stages {
stage('Intall JQ') {
steps {
script {
sh 'apt update; apt install jq=1.5+dfsg-2+b1 -y'
}
}
}
}
}
Additionally, if a file has a bad multiple of the required spaces for the indent level, it will be fixed.
pipeline {
agent any
stages { // <- this has 3 spaces
stage('Intall JQ') {
steps {
script {
sh 'apt update; apt install jq=1.5+dfsg-2+b1 -y'
}
}
}
}
}
Running --format
causes this change to occur:
diff --git a/Jenkinsfile b/Jenkinsfile
index c30cd86..c555b1a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -13,7 +13,7 @@ def steps = {
image.inside {
sshagent(credentials: ['ssh-creds']) {
- env.GIT_SSH_COMMAND='ssh -T -o StrictHostKeyChecking=no'
+ env.GIT_SSH_COMMAND = 'ssh -T -o StrictHostKeyChecking = no'
stage('Validate Terraform') {
sh 'terraform validate'
(END)
I would not expect this to be formatted as it causes the build to fail.
I'm not sure about this one, but since we already exclude the NoDef
rule, would not make sense to exclude this one as well?
In my example I have:
def buildNpmProject() {} // return type is void (there is no return)
After running npm-groovy-lint --format
on a project, I noticed it resulted in several compilation issues.
I tried to whittle the problematic code down to a minimal-ish example:
boolean foo(boolean a, boolean b) {
if (a) {
return true
} else if(b) { // post-format, this breaks (ends up as `elseif`)
return true
}
}
I found that if I add a space, like else if (b) {
it stops exhibiting this behavior, but I'm not sure if that's the whole story.
So lets say I have this function:
def testFunction() {
testClosure(["first item", "second item",
"newline item"]) {
println("hello world")
}
}
When I run npm-groovy-lint
, it moves the closing }
for testClosure
into a very weird and wrong spot:
def testFunction() {
testClosure(["first item", "second item",
"newline item"]) {
println("hello world")
}
}
Ideally it would either do 1) do nothing, 2) collapse the closure parameters onto one line (if there is space):
def testFunction() {
testClosure(["first item", "second item", "newline item"]) {
println("hello world")
}
}
Or 3) bring the parameters onto a newline and close the parameters with the closing square bracket and opening brace on a new line:
def testFunction() {
testClosure([
"first item",
"second item",
"newline item"
]) {
println("hello world")
}
}
In anycase, messing with the closing brace is definitely wrong.
Hey!
I'm working on adding the npm-groovy-linter to the GitHub Super-Linter
But I'm getting some odd behavior when testing the system, and getting bad results...
Any Idea why it's not understanding the test case?
bash-5.0# npm-groovy-lint -s bad.groovy
0
0 info File codeNarcTmpDir_0.2818605574397848.groovy does not end with a newline FileEndsWithoutNewline
1 warning Class should be marked with one of @GrailsCompileStatic, @CompileStatic or @CompileDynamic CompileStatic
npm-groovy-lint results in 1 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 1 │
│ 2 │ 'Info' │ 1 │
└─────────┴───────────┴─────────────┘
Contents of bad.groovy
:
Example {
void main(String[] args) {
File file = new File("E:/Example.txt")
println "The file ${file.absolutePath} has ${file.length()} bytes
}
}
I have both Groovy and Jenkinsfiles in my repo, and I would like to lint each against a different set of rules. Since I just have a couple of Jenkinsfiles, it would be very welcome if I could set this at the beginning of the file:
/* groovylint-extends recommended-jenkinsfile */
This is probably another fix for #79.
I noticed there are --failoninfo
--failonwarning
and --failonerror
but they cannot be used together.
--failoninfo
also doesn't seem to include warnings or errors (it's not an error level selector, which would make sense to some extent). The help documentation also seems to have a copy-paste issue as error and info have the same help text.
--failonerror Fails if at least one error is found
--failonwarning Fails if at least one warning is found
--failoninfo Fails if at least one error is found
Is there a way to configure this to return 1 if the report is not 100% clean. It's not clear from the help how that can be accomplished.
Tested with
npm-groovy-lint version 5.1.1
Embeds:
I want to disable the rules for *.gradle
files. How do I do this in the .groovylintrc
file?
npm-groovy-lint is not able to find my local Java installation.
The module version is as of this date (9/4) (couldn't get the exact version due to the error shown below) -
npm-groovy-lint --version
Java jre or jdk between 8 and undefined is required
Installing Java jre 8 in /Users/<user>/.java-caller...
Unexpected error: request to https://api.adoptopenjdk.net/v2/info/releases/openjdk8?type=jre&openjdk_impl=hotspot&release=latest&os=mac&arch=x64& failed, reason: self signed certificate in certificate chain
FetchError: request to https://api.adoptopenjdk.net/v2/info/releases/openjdk8?type=jre&openjdk_impl=hotspot&release=latest&os=mac&arch=x64& failed, reason: self signed certificate in certificate chain
at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm-groovy-lint/node_modules/node-fetch/lib/index.js:1455:11)
at ClientRequest.emit (events.js:314:20)
at TLSSocket.socketErrorListener (_http_client.js:469:9)
at TLSSocket.emit (events.js:314:20)
at emitErrorNT (internal/streams/destroy.js:100:8)
at emitErrorCloseNT (internal/streams/destroy.js:68:3)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Tried setting the java installation directly too -
npm-groovy-lint --format --verbose --javaexecutable /usr/bin/java
# Same error as above
which java
/usr/bin/java
java -version
openjdk version "1.8.0_265"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_265-b01)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.265-b01, mixed mode)
node -v
v14.9.0
Please let me know if you need more information or If I missed anything. My groovylintrc is pretty minimal -
{
"extends": "all",
"rules": {
"formatting.Indentation": {
"severity": "error",
"spacesPerIndentLevel": 2
}
}
}
Hi, I believe for security reasons, by default the server should listen on localhost only. Listening on any interface could unnecessarily expose the users' system.
For the same reason stated in #144.
I, for example, have a global function called buildNpmProject
.
I'm not sure if this is doable or not, but it would be great if this rule could be automatically ignored when checking for GStrings expressions within sh
steps in Jenkinsfiles, since they actually mean environment variables accessible by the shell interpreter.
E.g.:
sh '''
echo $SHELL
'''
When I specify a log level like warning it not only doesnt print the info items, it doesn't count them either.
Example:
docker run -u "$(id -u):$(id -g)" -w=/tmp -v "$PWD":/tmp --entrypoint "npm-groovy-lint" nvuillam/npm-groovy-lint --failon warning -f 'vars/*.groovy' -l warning
GroovyLint: Started CodeNarc Server
/tmp/vars/bash.groovy
/tmp/vars/log.groovy
npm-groovy-lint results in 0 linted files:
┌─────────┬───────────┬─────────────┐
│ (index) │ Severity │ Total found │
├─────────┼───────────┼─────────────┤
│ 0 │ 'Error' │ 0 │
│ 1 │ 'Warning' │ 0 │
│ 2 │ 'Info' │ 0 │
└─────────┴───────────┴─────────────┘
package.json not found, use default value {"name":"npm-groovy-lint","version":"0.0.0"} instead
The report says there was 0 linted files but it did look at two files it just didn't find anything. Also it says 0 info found but there were actually close to 100 items found.
I was expecting the number of linted files to be the total number of files that were checked regardless if any issues were found.
I was also expecting the info issues to be counted even if I didn't want all the info items printed to stdout.
Just my thoughts. Thanks for this tool, its been very handy.
Since we don't create classes for declarative pipelines, this rule does not make sense. Often, all we have is a function defined globally:
boolean isTrue(boolean var) {
return isTrue
}
pipeline {
[...]
}
This rule would complain about the isTrue
function name.
CodeNarc released its 1.6 version, let.s embed it into npm-groovy-lint then vscode-groovy-lint :)
I am very busy at my actual work this month so I fon't have the time... if some nice contributor would like to do it, please make a PR !
Else i'll do that when i'm more available :)
I'm trying to use the --ignorepattern
option on the command line, but it doesn't seem to be working as expected. Specifically, I would like to ignore the usual node_modules
directory.
npm-groovy-lint --files '**/*.groovy' --ignorepattern '**/node_modules/*'
I've tried several variations on the pattern with no luck. Is this a bug, or am I just missing the right format?
I'm currently running on Windows 10 with:
npm-groovy-lint version 4.5.4
Embeds:
- CodeNarc version 1.5
- Groovy version 3.0.3 (superlite)
I'm trying to redefine the BracesForIfElse since I use braces on different lines for readability.
The documentation says to create a file, doesn't say were. A step by step process would be nice for being able to adapt the extension rules to our dev process.
Thanks.
Example: Class Environment
is the only class in codeNarcTmpFile_0.7864807168553147.groovy
. In such a case the file and the class should have the same name.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.