From 6d6188e34d4dd1575626e585a04ac37baaff8c4c Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 5 Jul 2020 02:04:39 +0200 Subject: [PATCH] GitHub Actions: Add mypy problem matcher (#37485) --- .github/workflows/ci.yaml | 3 +++ .github/workflows/matchers/mypy.json | 16 ++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .github/workflows/matchers/mypy.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 348727b3f3d..fb230aa166a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -669,6 +669,9 @@ jobs: run: | echo "Failed to restore Python virtual environment from cache" exit 1 + - name: Register mypy problem matcher + run: | + echo "::add-matcher::.github/workflows/matchers/mypy.json" - name: Run mypy run: | . venv/bin/activate diff --git a/.github/workflows/matchers/mypy.json b/.github/workflows/matchers/mypy.json new file mode 100644 index 00000000000..f048fce5289 --- /dev/null +++ b/.github/workflows/matchers/mypy.json @@ -0,0 +1,16 @@ +{ + "problemMatcher": [ + { + "owner": "mypy", + "pattern": [ + { + "regexp": "^(.+):(\\d+):\\s(error|warning):\\s(.+)$", + "file": 1, + "line": 2, + "severity": 3, + "message": 4 + } + ] + } + ] +}