npm-groovy-lint
Advanced tools
Comparing version 6.0.0 to 6.1.0
# Changelog | ||
## [6.0.0] 2020-UNRELEASED | ||
## [6.1.0] 2020-08-04 | ||
- Java 14 compatibility (Closes [#77](https://github.com/nvuillam/npm-groovy-lint/issues/7)) | ||
## [6.0.0] 2020-08-03 | ||
- Upgrade to [CodeNarc v1.6.1](https://github.com/CodeNarc/CodeNarc/blob/v1.6-patch-releases/CHANGELOG.md#version-161----aug-2020) | ||
@@ -6,0 +10,0 @@ - Update list of rules |
@@ -30,3 +30,3 @@ // Call CodeNarc by server or java | ||
minimumJavaVersion: 1.8, | ||
maximumJavaVersion: 11.99, | ||
maximumJavaVersion: 14.99, | ||
mainClass: "com.nvuillam.CodeNarcServer", | ||
@@ -37,3 +37,3 @@ classPath: "java/CodeNarcServer.jar:java/*" | ||
minimumJavaVersion: 1.8, | ||
maximumJavaVersion: 11.99, | ||
maximumJavaVersion: 14.99, | ||
mainClass: "org.codenarc.CodeNarc", | ||
@@ -40,0 +40,0 @@ classPath: |
@@ -14,3 +14,3 @@ // Configuration file management | ||
const NPM_GROOVY_LINT_CONSTANTS = { | ||
CodeNarcVersion: "1.6", | ||
CodeNarcVersion: "1.6.1", | ||
GroovyVersion: "3.0.5" | ||
@@ -17,0 +17,0 @@ }; |
@@ -27,2 +27,7 @@ // Output management | ||
// No files = no result (mostly happens when lint has been cancelled before being completed) | ||
if (lintResult.files == null) { | ||
return lintResult; | ||
} | ||
for (const fileName of Object.keys(lintResult.files)) { | ||
@@ -29,0 +34,0 @@ const fileResults = lintResult.files[fileName]; |
@@ -11,3 +11,3 @@ #! /usr/bin/env node | ||
describe("Miscellaneous", function() { | ||
describe("Miscellaneous", function () { | ||
beforeEach(beforeEachTestCase); | ||
@@ -164,3 +164,3 @@ | ||
const requestKey = "requestKeyCalculatedByExternal" + Math.random(); | ||
const delay = 500; | ||
const delay = os.platform === 'win32' ? 500 : 300; | ||
const npmGroovyLintConfig = { | ||
@@ -172,6 +172,7 @@ path: "./lib/example/", | ||
}; | ||
const linterProms = []; | ||
const linter1 = new NpmGroovyLint(npmGroovyLintConfig, { | ||
requestKey: requestKey | ||
}); | ||
linter1.run(); | ||
linterProms.push(linter1.run()); | ||
await sleepPromise(delay); | ||
@@ -181,3 +182,3 @@ const linter2 = new NpmGroovyLint(npmGroovyLintConfig, { | ||
}); | ||
linter2.run(); | ||
linterProms.push(linter2.run()); | ||
await sleepPromise(delay); | ||
@@ -187,3 +188,3 @@ const linter3 = new NpmGroovyLint(npmGroovyLintConfig, { | ||
}); | ||
linter3.run(); | ||
linterProms.push(linter3.run()); | ||
await sleepPromise(delay); | ||
@@ -193,3 +194,3 @@ const linter4 = new NpmGroovyLint(npmGroovyLintConfig, { | ||
}); | ||
linter4.run(); | ||
linterProms.push(linter4.run()); | ||
await sleepPromise(delay); | ||
@@ -199,3 +200,3 @@ const linter5 = new NpmGroovyLint(npmGroovyLintConfig, { | ||
}); | ||
linter5.run(); | ||
linterProms.push(linter5.run()); | ||
await sleepPromise(delay); | ||
@@ -205,15 +206,19 @@ const linter6 = new NpmGroovyLint(npmGroovyLintConfig, { | ||
}); | ||
linter6.run(); | ||
linterProms.push(linter6.run()); | ||
await sleepPromise(delay); | ||
const linterLast = await new NpmGroovyLint(npmGroovyLintConfig, { | ||
const linterLast = new NpmGroovyLint(npmGroovyLintConfig, { | ||
requestKey: requestKey | ||
}).run(); | ||
}); | ||
await linterLast.run(); | ||
assert(linter1.status === 9, `Linter 1 status is 9 (returned ${linter1.status}`); | ||
assert(linter2.status === 9, `Linter 2 status is 9 (returned ${linter2.status}`); | ||
assert(linter3.status === 9, `Linter 3 status is 9 (returned ${linter3.status}`); | ||
assert(linter4.status === 9, `Linter 4 status is 9 (returned ${linter4.status}`); | ||
assert(linter5.status === 9, `Linter 5 status is 9 (returned ${linter5.status}`); | ||
assert(linter6.status === 9, `Linter 6 status is 9 (returned ${linter6.status}`); | ||
assert(linterLast.status === 0, `LinterLast status = 0 (returned ${linterLast.status}`); | ||
assert([0, 9].includes(linter1.status), `Linter 1 status is 9 or 0 (returned ${linter1.status}`); | ||
assert([0, 9].includes(linter2.status), `Linter 2 status is 9 or 0 (returned ${linter2.status}`); | ||
assert([0, 9].includes(linter3.status), `Linter 3 status is 9 or 0 (returned ${linter3.status}`); | ||
assert([0, 9].includes(linter4.status), `Linter 4 status is 9 or 0 (returned ${linter4.status}`); | ||
assert([0, 9].includes(linter5.status), `Linter 5 status is 9 or 0 (returned ${linter5.status}`); | ||
assert([0, 9].includes(linter6.status), `Linter 6 status is 9 or 0 (returned ${linter6.status}`); | ||
assert([0].includes(linterLast.status), `LinterLast status = 0 (returned ${linterLast.status}`); | ||
assert([linter1.status, linter2.status, linter3.status, linter4.status, linter5.status, linter6.status].includes(9), `at least one response code is 9`); | ||
await Promise.all(linterProms); | ||
}); | ||
@@ -220,0 +225,0 @@ |
{ | ||
"name": "npm-groovy-lint", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -375,4 +375,8 @@ <!-- markdownlint-disable MD033 --> | ||
### [6.0.0] 2020-UNRELEASED | ||
## [6.1.0] 2020-08-04 | ||
- Java 14 compatibility (Closes [#77](https://github.com/nvuillam/npm-groovy-lint/issues/7)) | ||
### [6.0.0] 2020-08-03 | ||
- Upgrade to [CodeNarc v1.6.1](https://github.com/CodeNarc/CodeNarc/blob/v1.6-patch-releases/CHANGELOG.md#version-161----aug-2020) | ||
@@ -379,0 +383,0 @@ - Upgrade to [GMetrics v1.1](https://github.com/dx42/gmetrics/blob/master/CHANGELOG.md#version-11-may-2020) |
16579275
8171
464