npm-groovy-lint
Advanced tools
Comparing version 3.1.1 to 3.1.2-beta.0
@@ -30,2 +30,5 @@ // Missing else braces | ||
let line = allLines[lineNumber]; | ||
if (!line.includes("else")) { | ||
throw new Error('Line does not contain "if" :' + line); | ||
} | ||
line = line.trimEnd() + " {"; | ||
@@ -32,0 +35,0 @@ allLines[lineNumber] = line; |
@@ -23,3 +23,3 @@ // Missing if braces | ||
const lineNumber = getVariable(variables, "lineNb", { mandatory: true }); | ||
// If next line is also a if/else, this rule can not autofix for now, it has to be done manually | ||
// If next line is also a if/else, or if line does not contain if this rule can not autofix for now, it has to be done manually | ||
const nextLineAfterFoundOne = allLines[lineNumber + 1]; | ||
@@ -32,4 +32,6 @@ if ( | ||
} | ||
// If line | ||
let line = allLines[lineNumber]; | ||
if (!line.includes("if")) { | ||
throw new Error('Line does not contain "if" :' + line); | ||
} | ||
line = line.trimEnd() + " {"; | ||
@@ -36,0 +38,0 @@ allLines[lineNumber] = line; |
@@ -33,3 +33,3 @@ // Indentation | ||
fix: { | ||
label: "Fix indentation", | ||
label: "Correct Indentation", | ||
type: "function", | ||
@@ -36,0 +36,0 @@ func: (line, evaluatedVars) => { |
{ | ||
"name": "npm-groovy-lint", | ||
"version": "3.1.1", | ||
"version": "3.1.2-beta.0", | ||
"description": "NPM CodeNarc wrapper to easily lint Groovy files", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
16287343
3969
1