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 3.0.0-beta.2 to 3.0.0-beta.3

jdeploy-bundle/lib/com/nvuillam/CodeNarcServer$_initialize_closure1$_closure2.class

13

jdeploy-bundle/groovy-lint-fix.js

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

const cliProgress = require("cli-progress");
const debug = require("debug")("npm-groovy-lint");
const { npmGroovyLintRules } = require("./groovy-lint-rules.js");

@@ -184,4 +185,4 @@ const { evaluateVariables, getSourceLines } = require("./utils.js");

if (this.verbose) {
console.error(e.message);
console.error(fixableError);
debug(e.message);
debug(fixableError);
}

@@ -209,4 +210,4 @@ return line;

newLine = newLine.replace(strBefore, strAfter);
} else if (this.verbose) {
console.error("NGL: missing replacement variable(s):\n" + strBefore + "\n" + strAfter + "\n" + JSON.stringify(fixableError));
} else {
debug("NGL: missing replacement variable(s):\n" + strBefore + "\n" + strAfter + "\n" + JSON.stringify(fixableError));
}

@@ -219,5 +220,3 @@ }

} catch (e) {
if (this.verbose) {
console.error("NGL: Function error: " + e.message + " / " + JSON.stringify(fixableError));
}
debug("NGL: Function error: " + e.message + " / " + JSON.stringify(fixableError));
}

@@ -224,0 +223,0 @@ }

@@ -70,3 +70,2 @@ // Additional definition for codenarc rules ( get position & available fix)

"NoTabCharacter",
"TrailingWhitespace",
"Indentation",

@@ -81,2 +80,3 @@ "UnnecessaryGString",

"UnnecessarySemicolon",
"TrailingWhitespace",

@@ -83,0 +83,0 @@ // Rule that can change the numbers of lines, so they must be processed after line scope rules

#! /usr/bin/env node
const DEFAULT_VERSION = "3.0.0-beta.2";
// Imports
const c = require("ansi-colors");
const cliProgress = require("cli-progress");
const debug = require("debug")("npm-groovy-lint");
const fse = require("fs-extra");

@@ -19,2 +22,3 @@ const os = require("os");

const { evaluateRange, evaluateVariables, getSourceLines } = require("./utils.js");
class NpmGroovyLint {

@@ -115,3 +119,3 @@ "use strict";

} catch {
v = "3.0.0-beta.1";
v = DEFAULT_VERSION;
}

@@ -316,5 +320,3 @@ }

// Start progress bar
if (this.options.verbose) {
console.log("NGL: running CodeNarc using " + jDeployCommand);
}
debug("NGL: running CodeNarc using " + jDeployCommand);
this.bar = new cliProgress.SingleBar(

@@ -336,3 +338,3 @@ {

// originalJDeploy.js Execution using child process
// originalJDeploy.js Execution using child process (or originaljdeployPlanB if originaljdeploy.js failed)
let execRes;

@@ -375,3 +377,3 @@ try {

const start = performance.now();
await new Promise((resolve, reject) => {
await new Promise(resolve => {
interval = setInterval(() => {

@@ -392,3 +394,3 @@ request

);
reject();
resolve();
}

@@ -399,3 +401,3 @@ })

this.declareServerError(e, interval);
reject();
resolve();
}

@@ -409,6 +411,11 @@ });

}
console.log(`NGL: Started CodeNarc Server after ${attempts} attempts`);
return true;
if (this.serverStatus === "running") {
console.log(`NGL: Started CodeNarc Server after ${attempts} attempts`);
return true;
} else {
return false;
}
}
// Stop polling and log error
declareServerError(e, interval) {

@@ -420,5 +427,3 @@ this.serverStatus = "error";

console.log("NGL: Unable to start CodeNarc Server. Use --noserver if you do not even want to try");
if (this.verbose && e) {
console.error(e.message);
}
debug(e.message);
}

@@ -425,0 +430,0 @@

@@ -0,0 +0,0 @@ Copyright (c) 2002-2012, the original author or authors.

@@ -0,0 +0,0 @@ The person or persons who have associated work with this document (the

@@ -0,0 +0,0 @@ Copyright (c) 2006, Sun Microsystems, Inc.

@@ -0,0 +0,0 @@ Eclipse Public License - v 1.0

@@ -0,0 +0,0 @@ Eclipse Public License - v 2.0

@@ -0,0 +0,0 @@ Copyright (c) 2003-2006, Joe Walnes

// Shared functions
"use strict";
const debug = require("debug")("npm-groovy-lint");
const decodeHtml = require("decode-html");

@@ -17,3 +18,3 @@ const fse = require("fs-extra");

// Evaluate variables from messages
function evaluateVariables(variableDefs, msg, optns = { verbose: false }) {
function evaluateVariables(variableDefs, msg) {
const evaluatedVars = [];

@@ -31,4 +32,4 @@ for (const varDef of variableDefs || []) {

});
} else if (optns.verbose) {
console.error("NGL: Unable to match " + varDef.regex + " in " + msg);
} else {
debug("NGL: Unable to match " + varDef.regex + " in " + msg);
}

@@ -43,3 +44,3 @@ } else if (varDef.value) {

// Get position to highlight in sources
function evaluateRange(errItem, rule, evaluatedVars, errLine, allLines, optns = { verbose: false }) {
function evaluateRange(errItem, rule, evaluatedVars, errLine, allLines) {
let range;

@@ -51,5 +52,3 @@ if (rule.range) {

} catch (e) {
if (optns.verbose) {
console.error("NGL: Range function error: " + e.message + " / " + JSON.stringify(rule) + "\n" + JSON.stringify(errItem));
}
debug("NGL: Range function error: " + e.message + " / " + JSON.stringify(rule) + "\n" + JSON.stringify(errItem));
}

@@ -56,0 +55,0 @@ }

{
"name": "npm-groovy-lint",
"version": "3.0.0-beta.2",
"version": "3.0.0-beta.3",
"description": "NPM CodeNarc wrapper to easily lint Groovy files",

@@ -47,2 +47,3 @@ "main": "index.js",

"cli-progress": "^3.6.0",
"debug": "^4.1.1",
"decode-html": "^2.0.0",

@@ -49,0 +50,0 @@ "fs-extra": "^8.1.0",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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