From ffc725d5d82178a109b92a88dd42775b2c3edb82 Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Tue, 19 Sep 2023 11:31:14 +0200 Subject: [PATCH] Add matchers for linting problems on CI --- .github/matchers/ruff.json | 16 ++++++++++++++++ .github/matchers/unbehead.json | 14 ++++++++++++++ .github/workflows/linting.yaml | 9 ++++++++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/matchers/ruff.json create mode 100644 .github/matchers/unbehead.json diff --git a/.github/matchers/ruff.json b/.github/matchers/ruff.json new file mode 100644 index 0000000..2565694 --- /dev/null +++ b/.github/matchers/ruff.json @@ -0,0 +1,16 @@ +{ + "problemMatcher": [ + { + "owner": "ruff", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+):(\\d+): (.+)$", + "file": 1, + "line": 2, + "column": 3, + "message": 4 + } + ] + } + ] +} diff --git a/.github/matchers/unbehead.json b/.github/matchers/unbehead.json new file mode 100644 index 0000000..814e103 --- /dev/null +++ b/.github/matchers/unbehead.json @@ -0,0 +1,14 @@ +{ + "problemMatcher": [ + { + "owner": "unbehead", + "pattern": [ + { + "regexp": "^((?:Missing|Incorrect) header) in (.+)$", + "message": 1, + "file": 2 + } + ] + } + ] +} diff --git a/.github/workflows/linting.yaml b/.github/workflows/linting.yaml index 1883cec..cd9e258 100644 --- a/.github/workflows/linting.yaml +++ b/.github/workflows/linting.yaml @@ -10,6 +10,9 @@ on: - devel - master +env: + NO_COLORS: true + jobs: setup: runs-on: ubuntu-22.04 @@ -47,4 +50,8 @@ jobs: poetry install - name: Run tests run: | - poetry run -- make lint + echo "::add-matcher::.github/matchers/ruff.json" + echo "::add-matcher::.github/matchers/unbehead.json" + poetry run -- make lint --keep-going + echo "::remove-matcher owner=unbehead::" + echo "::remove-matcher owner=ruff::"