From c84bbd7607f73882aefa3a2006a29635357f8755 Mon Sep 17 00:00:00 2001 From: kedhammar Date: Thu, 30 Nov 2023 14:10:03 +0100 Subject: [PATCH] keep error code, add suggested fix --- .github/workflows/lint-code.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-code.yml b/.github/workflows/lint-code.yml index be71a7cc..50eb3a47 100644 --- a/.github/workflows/lint-code.yml +++ b/.github/workflows/lint-code.yml @@ -32,9 +32,9 @@ jobs: pip install isort - name: isort --> Check for best-practice sorting of imports run: | - msg="Suggest running 'isort .' to fix this." + msg="Suggested fix: run 'isort .' on this repo." isort --check . \ - || echo "::error ::$msg" + || echo "::error ::$msg" && exit 1 ruff-format: runs-on: ubuntu-latest @@ -50,7 +50,10 @@ jobs: python -m pip install --upgrade pip pip install ruff - name: ruff --> Check code formatting - run: ruff format --check . + run: | + msg="Suggested fix: run 'ruff format .' on this repo." + ruff format --check . \ + || echo "::error ::$msg" && exit 1 mypy-check: runs-on: ubuntu-latest @@ -66,4 +69,4 @@ jobs: python -m pip install --upgrade pip pip install mypy - name: mypy --> Static type checking - run: mypy --ignore-missing-imports --follow-imports=skip --exclude build . + run: mypy --ignore-missing-imports --follow-imports=skip --exclude build .