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 + } + ] + } + ] +}