From 0e76be6bab2a9d3b42c6fed80d46087a227990bf Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 14 Jul 2021 14:36:24 +0200 Subject: [PATCH] Add first step for a Home Assistant problem matcher (#31) --- action.yaml | 5 +++++ matcher.json | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 matcher.json diff --git a/action.yaml b/action.yaml index aac49ef..ef28ea0 100644 --- a/action.yaml +++ b/action.yaml @@ -88,6 +88,11 @@ runs: docker pull -q "homeassistant/home-assistant:${version}" + - name: 🏗 Register Home Assistant problem matcher + shell: bash + run: | + echo "::add-matcher::matcher.json" + - name: 🚀 Run Home Assistant Configuration Check shell: bash run: | diff --git a/matcher.json b/matcher.json new file mode 100644 index 0000000..21667f9 --- /dev/null +++ b/matcher.json @@ -0,0 +1,25 @@ +{ + "problemMatcher": [ + { + "owner": "homeassistant-warnings", + "pattern": [ + { + "regexp": "^(WARNING):(.*)$", + "severity": 1, + "message": 2 + } + ] + }, + { + "owner": "homeassistant-invalid-config", + "pattern": [ + { + "regexp": "(Invalid config for .*) \\(See (.*)(?::|, line )(\\d|\\?)\\)", + "file": 2, + "line": 3, + "message": 1 + } + ] + } + ] +}