npm-groovy-lint 12.1.2-beta202311192219.0 → 12.2.1-beta202311260926.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -198,7 +198,7 @@ class NpmGroovyLint {
198
198
  const v = getNpmGroovyLintVersion();
199
199
 
200
200
  const codeNarcVersionLinter = await new NpmGroovyLint([process.execPath, "", "--codenarcargs", "-version"], {}).run();
201
- const codeNarcVersionLines = [(await getSourceLines(codeNarcVersionLinter.codeNarcStdOut))[0]];
201
+ const codeNarcVersionLines = [(await getSourceLines(codeNarcVersionLinter.codeNarcStdOut || "Error collecting CodeNarc version"))[0]];
202
202
 
203
203
  const versions = [];
204
204
  versions.push(`npm-groovy-lint version ${v}`);
@@ -500,21 +500,25 @@ class NpmGroovyLint {
500
500
  // Fail on error
501
501
  if (failureLevel === "error" && errorNb > 0) {
502
502
  if (!["json", "sarif", "stdout"].includes(this.outputType)) {
503
- console.error(`Failure summary: ${JSON.stringify(this.lintResult.summary, null, 2)}`);
503
+ console.error(`Failure: ${this.lintResult.summary.totalRemainingErrorNumber} error(s) have been found`);
504
504
  }
505
505
  this.status = 1;
506
506
  }
507
507
  // Fail on warning
508
508
  else if (failureLevel === "warning" && (errorNb > 0 || warningNb > 0)) {
509
509
  if (!["json", "sarif", "stdout"].includes(this.outputType)) {
510
- console.error(`Failure summary: ${JSON.stringify(this.lintResult.summary, null, 2)}`);
510
+ console.error(
511
+ `Failure: ${this.lintResult.summary.totalRemainingErrorNumber} error(s) have been found \n ${this.lintResult.summary.totalRemainingWarningNumber} warning(s) have been found`
512
+ );
511
513
  }
512
514
  this.status = 1;
513
515
  }
514
516
  // Fail on info
515
517
  else if (failureLevel === "info" && (errorNb > 0 || warningNb > 0 || infoNb > 0)) {
516
518
  if (!["json", "sarif", "stdout"].includes(this.outputType)) {
517
- console.error(`Failure summary: ${JSON.stringify(this.lintResult.summary, null, 2)}`);
519
+ console.error(
520
+ `Failure: ${this.lintResult.summary.totalRemainingErrorNumber} error(s) have been found \n ${this.lintResult.summary.totalRemainingWarningNumber} warning(s) have been found \n ${this.lintResult.summary.totalRemainingInfoNumber} info(s) have been found`
521
+ );
518
522
  }
519
523
  this.status = 1;
520
524
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-groovy-lint",
3
- "version": "12.1.2-beta202311192219.0",
3
+ "version": "12.2.1-beta202311260926.0",
4
4
  "description": "Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle files",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -60,7 +60,7 @@
60
60
  "glob": "^7.1.6",
61
61
  "import-fresh": "^3.2.1",
62
62
  "ip": "^1.1.5",
63
- "java-caller": "^3.1.1",
63
+ "java-caller": "^3.2.0",
64
64
  "js-yaml": "^4.1.0",
65
65
  "node-sarif-builder": "^2.0.3",
66
66
  "optionator": "^0.8.3",