Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

npm-groovy-lint

Package Overview
Dependencies
Maintainers
1
Versions
204
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-groovy-lint - npm Package Compare versions

Comparing version 2.0.1 to 2.2.0-beta.1

23

jdeploy-bundle/groovy-lint.js

@@ -66,3 +66,3 @@ #! /usr/bin/env node

// Manage when the user wants to use only codenarc args
if (this.args.includes("--codenarcargs")) {
if (Array.isArray(this.args) && this.args.includes("--codenarcargs")) {
this.codenarcArgs = this.args.slice(2).filter(userArg => userArg !== "--codenarcargs");

@@ -104,6 +104,6 @@ this.onlyCodeNarc = true;

const baseBefore =
(this.options.path != "." && this.options.path.startsWith("/")) || this.options.path.includes(":/") || this.options.path.includes(":\\")
(this.options.path !== "." && this.options.path.startsWith("/")) || this.options.path.includes(":/") || this.options.path.includes(":\\")
? ""
: process.cwd() + "/";
this.codeNarcBaseDir = this.options.path != "." ? baseBefore + this.options.path.replace(/^"(.*)"$/, "$1") : process.cwd();
this.codeNarcBaseDir = this.options.path !== "." ? baseBefore + this.options.path.replace(/^"(.*)"$/, "$1") : process.cwd();
this.codenarcArgs.push('-basedir="' + this.codeNarcBaseDir + '"');

@@ -139,7 +139,7 @@

this.output = this.options.output.replace(/^"(.*)"$/, "$1");
if (this.output.includes(".txt")) {
if (this.output.includes(".txt") || this.output === "none") {
// Disable ansi colors if output in txt file
c.enabled = false;
}
if (["txt", "json"].includes(this.output) || this.output.endsWith(".txt") || this.output.endsWith(".json")) {
if (["txt", "json", "none"].includes(this.output) || this.output.endsWith(".txt") || this.output.endsWith(".json")) {
this.outputType = this.output.endsWith(".txt") ? "txt" : this.output.endsWith(".json") ? "json" : this.output;

@@ -172,3 +172,4 @@ this.codenarcArgs.push('-report=xml:"' + this.tmpXmlFileName + '"');

// Build jdeploy codenarc command , filter non-codenarc arguments
const jDeployCommand = '"' + this.args[0] + '" "' + this.jdeployRootPath.trim() + "/" + this.jdeployFile + '" ' + this.codenarcArgs.join(" ");
const nodeExe = this.args[0] && this.args[0].includes("node") ? this.args[0] : "node";
const jDeployCommand = '"' + nodeExe + '" "' + this.jdeployRootPath.trim() + "/" + this.jdeployFile + '" ' + this.codenarcArgs.join(" ");

@@ -276,13 +277,13 @@ // Start progress bar

id: errId,
line: violation["$"].lineNumber,
line: violation["$"].lineNumber ? parseInt(violation["$"].lineNumber, 10) : null,
rule: violation["$"].ruleName,
severity:
violation["$"].priority == "1"
violation["$"].priority === "1"
? "error"
: violation["$"].priority == "2"
: violation["$"].priority === "2"
? "warning"
: violation["$"].priority == "3"
: violation["$"].priority === "3"
? "info"
: "unknown",
msg: violation.Message ? violation.Message[0] : "NGL: No message"
msg: violation.Message ? violation.Message[0] : ""
};

@@ -289,0 +290,0 @@ // Add error only if severity is matching logLevel

{
"name": "npm-groovy-lint",
"version": "2.0.1",
"version": "2.2.0-beta.1",
"description": "NPM CodeNarc wrapper to easily lint Groovy files",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc