From 829957d3e14a4cc80d25945633919d48faed67f4 Mon Sep 17 00:00:00 2001 From: Adam Yoblick Date: Mon, 14 Aug 2023 15:01:16 -0500 Subject: [PATCH] Set linter step to continue on error --- azure-pipelines/pipelines.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/azure-pipelines/pipelines.yaml b/azure-pipelines/pipelines.yaml index 99a4e3c8..37b6a1eb 100644 --- a/azure-pipelines/pipelines.yaml +++ b/azure-pipelines/pipelines.yaml @@ -38,10 +38,12 @@ jobs: - script: "python3 -m pip install -U ruff" displayName: "Install ruff" - # To unblock the build even with lint errors, add "--exit-zero" to the command line - # TODO: REMOVE THE --exit-zero FLAG WHEN ALL LINTER ERRORS ARE GONE - - script: "python3 -m ruff check --exit-zero --format=junit --output-file=$(Build.ArtifactStagingDirectory)/lint-ruff.xml ." + # We just switched to a new linter and there are a ton of errors. We need time to go through them, but we don't want the block the build. + # Therefore, we use continueOnError to generate a warning while there are linter errors. The build will still run. + # To force the step to return zero even with linter errors, add "--exit-zero" after the "check" in the command line + - script: "python3 -m ruff check --format=junit --output-file=$(Build.ArtifactStagingDirectory)/lint-ruff.xml ." displayName: "Run ruff" + continueOnError: "true" - task: "PublishTestResults@2" displayName: "Publish linting results"