@nxlv/python
Advanced tools
Comparing version 1.9.0 to 1.9.1
@@ -10,2 +10,8 @@ # Changelog | ||
## [1.9.1] - 2022-07-19 | ||
### Fixed | ||
- Fixed `@nxlv/nx-python:flake8` to return error when the `pylint.txt` has more than 1 line. | ||
## [1.9.0] - 2022-07-18 | ||
@@ -12,0 +18,0 @@ |
{ | ||
"name": "@nxlv/python", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "Custom NX Plugin to support the Python language", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -25,2 +25,5 @@ "use strict"; | ||
const executable = 'poetry'; | ||
if ((0, fs_extra_1.existsSync)(absPath)) { | ||
(0, fs_extra_1.rmSync)(absPath, { force: true }); | ||
} | ||
const lintingArgs = ['run', 'flake8', '--output-file', absPath]; | ||
@@ -30,5 +33,11 @@ cross_spawn_1.default.sync(executable, lintingArgs, { | ||
shell: false, | ||
stdio: 'inherit' | ||
stdio: 'inherit', | ||
}); | ||
console.log((0, chalk_1.default) `\n {green All files pass linting.}\n`); | ||
const output = (0, fs_extra_1.readFileSync)(absPath, 'utf8'); | ||
const lines = output.split('\n').length; | ||
if (lines > 1) { | ||
logger.info((0, chalk_1.default) `\n {bgRed.bold ERROR } linting issues\n${output}`); | ||
return { success: false }; | ||
} | ||
logger.info((0, chalk_1.default) `\n {green All files pass linting.}\n`); | ||
return { | ||
@@ -35,0 +44,0 @@ success: true, |
Sorry, the diff of this file is not supported yet
148942
1580