Angular TSLint:即使出错也继续下一步
Angular TSLint: Continue to next step even if Errors
在 Azure Devops Build Pipeline 中 运行 TSLint 时,我收到以下错误。
我想让构建管道继续下一步,即使有 lint 错误。
如何解决?
命令行:
- script: |
npm run lint > tsLintReport.txt
displayName: 'ng lint'
错误:
Lint warnings found in the listed files.
Lint errors found in the listed files.
Lint errors found in the listed files.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ipts@1.0.0 lint: `ng lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ipts@1.0.0 lint script.
请加continueOnError
:
- script: |
npm run lint > tsLintReport.txt
displayName: 'ng lint'
continueOnError: true
它不会破坏构建,但构建完成时出现问题。
尝试 运行ning "npm 运行 lint -- --fix" 将自动修复 lint 错误
在 Azure Devops Build Pipeline 中 运行 TSLint 时,我收到以下错误。 我想让构建管道继续下一步,即使有 lint 错误。 如何解决?
命令行:
- script: |
npm run lint > tsLintReport.txt
displayName: 'ng lint'
错误:
Lint warnings found in the listed files.
Lint errors found in the listed files.
Lint errors found in the listed files.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ipts@1.0.0 lint: `ng lint`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ipts@1.0.0 lint script.
请加continueOnError
:
- script: |
npm run lint > tsLintReport.txt
displayName: 'ng lint'
continueOnError: true
它不会破坏构建,但构建完成时出现问题。
尝试 运行ning "npm 运行 lint -- --fix" 将自动修复 lint 错误