From 3eb6e75d3e678d20ed0f8d6b64c6f67ff0c76a75 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Sun, 5 Jul 2020 02:05:14 +0200 Subject: [PATCH] GitHub Actions: Add yamllint problem matcher (#37468) * GitHub Actions: Add yamllint problem matcher * Introduce YAML issue to test problem matcher * Revert "Introduce YAML issue to test problem matcher" This reverts commit fa88c9484efc8f979fe2e3aed2f964381e319a56. --- .github/workflows/ci.yaml | 3 +++ .github/workflows/matchers/yamllint.json | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 .github/workflows/matchers/yamllint.json diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fb230aa166a..390b9874b38 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -498,6 +498,9 @@ jobs: run: | echo "Failed to restore Python virtual environment from cache" exit 1 + - name: Register yamllint problem matcher + run: | + echo "::add-matcher::.github/workflows/matchers/yamllint.json" - name: Run yamllint run: | . venv/bin/activate diff --git a/.github/workflows/matchers/yamllint.json b/.github/workflows/matchers/yamllint.json new file mode 100644 index 00000000000..ab9449dd77f --- /dev/null +++ b/.github/workflows/matchers/yamllint.json @@ -0,0 +1,22 @@ +{ + "problemMatcher": [ + { + "owner": "yamllint", + "pattern": [ + { + "regexp": "^(.*\\.ya?ml)$", + "file": 1 + }, + { + "regexp": "^\\s{2}(\\d+):(\\d+)\\s+(error|warning)\\s+(.*?)\\s+\\((.*)\\)$", + "line": 1, + "column": 2, + "severity": 3, + "message": 4, + "code": 5, + "loop": true + } + ] + } + ] +}