From 131afb5a078d72f3288f4496678b0dc720bad1c9 Mon Sep 17 00:00:00 2001 From: Adam Yoblick Date: Tue, 19 Sep 2023 15:31:15 -0500 Subject: [PATCH] allow ruff to fail the build if errors are detected --- azure-pipelines/pipelines.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/azure-pipelines/pipelines.yaml b/azure-pipelines/pipelines.yaml index e145d07c..4a28e2a1 100644 --- a/azure-pipelines/pipelines.yaml +++ b/azure-pipelines/pipelines.yaml @@ -38,13 +38,9 @@ jobs: # See https://github.com/astral-sh/ruff and https://beta.ruff.rs/docs/ - script: "python3 -m pip install -U ruff" displayName: "Install ruff" - - # 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"