From 5c1efb0fef0a7b2a88be63b5827bdd299f082e0f Mon Sep 17 00:00:00 2001 From: ks129 <45097959+ks129@users.noreply.github.com> Date: Thu, 26 Nov 2020 15:05:48 +0200 Subject: Format flake8 output to show annotations --- .github/workflows/forms-backend.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/forms-backend.yml b/.github/workflows/forms-backend.yml index 8a3eed8..9638728 100644 --- a/.github/workflows/forms-backend.yml +++ b/.github/workflows/forms-backend.yml @@ -41,17 +41,9 @@ jobs: run: | poetry install - # This allows GitHub to detect errors and relay them to PR Files tab - - name: Add flake8 matchers - run: echo "::add-matcher::./.github/flake8-matchers.json" - + # Use this formatting to show them as GH Actions annotations. - name: Run flake8 - run: "poetry run flake8" - - # We don't want that this catch any other errors than flake8 ones. - - name: Remove flake8 matchers - if: ${{ always() }} - run: echo "::remove-matcher owner=flake8-error::" && echo "::remove-matcher owner=flake8-warning::" + run: "poetry run flake8 --format='::error file=%(path)s,line=%(row)d,col=%(col)d::[flake8] %(code)s: %(text)s'" build: name: Build & Push -- cgit v1.2.3