fix(lint): wrap linting commands in workspace directory context
Signed-off-by: 孙振宇 <>
This commit is contained in:
parent
9352de5270
commit
5a718aa45d
@ -20,9 +20,11 @@ class ESLint extends LinterBase {
|
||||
}
|
||||
|
||||
def doLint() {
|
||||
steps.log.info("${linterType.linter}", "Install eslint dependencies...")
|
||||
steps.sh("npm install -g ${deps.join(' ')}")
|
||||
steps.log.info("${linterType.linter}", "Running eslint...")
|
||||
steps.sh("eslint --config ${configs} ${workspace}")
|
||||
steps.dir(workspace) {
|
||||
steps.log.info("${linterType.linter}", "Install eslint dependencies...")
|
||||
steps.sh("npm install --save-dev ${deps.join(' ')}")
|
||||
steps.log.info("${linterType.linter}", "Running eslint...")
|
||||
steps.sh("eslint --config ${configs} ${workspace}")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -9,6 +9,8 @@ class PyLint extends LinterBase {
|
||||
}
|
||||
|
||||
def doLint() {
|
||||
steps.sh("pylint --rcfile=${configs} ${workspace}")
|
||||
steps.dir(workspace) {
|
||||
steps.sh("pylint --rcfile=${configs} ${workspace}")
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user