npm-groovy-lint
Advanced tools
Comparing version 4.5.1 to 4.5.2
# Changelog | ||
## [4.5.2] 2020-04-29 | ||
- Expose `loadConfig()` method to load rules when npm-groovy-lint is used as a library | ||
- Fixes | ||
- Missing temporary rulesets file missing | ||
- Handle better CodeNarcServer concurrent calls | ||
## [4.5.1] 2020-04-28 | ||
@@ -4,0 +11,0 @@ |
@@ -272,3 +272,3 @@ // Shared functions | ||
// If RuleSet files has already been created, or is groovy file, return it | ||
if (options.rulesets && (options.rulesets.endsWith(".groovy") || options.rulesets.endsWith(".xml"))) { | ||
if (options.rulesets && (options.rulesets.endsWith(".groovy") || options.rulesets.endsWith(".xml")) && fse.existsSync(options.rulesets)) { | ||
return options.rulesets; | ||
@@ -275,0 +275,0 @@ } |
@@ -77,4 +77,3 @@ #! /usr/bin/env node | ||
debug(`Fix errors for ${JSON.stringify(errorIds)} on existing NpmGroovyLint instance`); | ||
const codeNarcFactoryResult = await prepareCodeNarcCall(this.options, this.jdeployRootPath); | ||
this.setMethodResult(codeNarcFactoryResult); | ||
await this.preProcess(); | ||
this.fixer = new NpmGroovyLintFix( | ||
@@ -109,2 +108,7 @@ this.lintResult, | ||
// Returns the loaded config | ||
async loadConfig(configFilePath, mode = "lint") { | ||
return await loadConfig(configFilePath, mode, null, []); | ||
} | ||
// Actions before call to CodeNarc | ||
@@ -379,3 +383,3 @@ async preProcess() { | ||
} | ||
} else { | ||
} else if (lintResAfterNewFix && lintResAfterNewFix.files) { | ||
for (const afterNewFixResFileNm of Object.keys(lintResAfterNewFix.files)) { | ||
@@ -382,0 +386,0 @@ // Set updatedSource in results in provided |
{ | ||
"name": "npm-groovy-lint", | ||
"version": "4.5.1", | ||
"version": "4.5.2", | ||
"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
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
16386743
4993