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 11.1.2-beta202311021422.0 to 11.1.2-beta202311021635.0

2

lib/rules/UnnecessaryGString.js

@@ -11,3 +11,3 @@ // Unnecessary Groovy String

name: "STRING",
regex: /The String '(.*)' can be wrapped in single quotes instead of double quotes/
regex: /The String '([\s\S]*)' can be wrapped in single quotes instead of double quotes/
}

@@ -14,0 +14,0 @@ ],

@@ -131,2 +131,19 @@ // Shared functions

// escapeMessage escapes a value as retrieved from CodeNarc
// from the "display name" so it matches the original source.
// See issue: https://github.com/CodeNarc/CodeNarc/issues/749
// Escaping as per: https://groovy-lang.org/syntax.html#_escaping_special_characters
function escapeValue(s) {
return s
.replace(/\\/g, "\\\\")
.replace(/[\b]/g, "\\b") // Class so \b is not a word boundary.
.replace(/\f/g, "\\f")
.replace(/\n/g, "\\n")
.replace(/\r/g, "\\r")
.replace(/\t/g, "\\t")
.replace(/\v/g, "\\v")
.replace(/'/g, "\\'")
.replace(/"/g, '\\"');
}
// Evaluate variables from messages

@@ -138,7 +155,7 @@ function evaluateVariables(variableDefs, msg) {

if (varDef.regex) {
msg = msg.replace(/\n/g, "\\n").replace(/\r/g, "\\r");
const regexRes = msg.match(varDef.regex);
if (regexRes && regexRes.length > 1) {
const regexPos = varDef.regexPos || 1;
const value = decodeHtml(regexRes[regexPos]);
let value = decodeHtml(regexRes[regexPos]);
value = escapeValue(value);
const varValue =

@@ -145,0 +162,0 @@ varDef.type && varDef.type === "number"

{
"name": "npm-groovy-lint",
"version": "11.1.2-beta202311021422.0",
"version": "11.1.2-beta202311021635.0",
"description": "Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle 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