From 11b90286ea5df6d7aa91b161a179ebc23bb51c52 Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Thu, 16 May 2024 15:38:33 +0100 Subject: [PATCH] Enable GitHub problem matcher for actionlint. --- .github/LICENSE.actionlint-matcher.json | 22 ++++++++++++++++++++++ .github/actionlint-matcher.json | 17 +++++++++++++++++ .github/workflows/lint.yml | 1 + 3 files changed, 40 insertions(+) create mode 100644 .github/LICENSE.actionlint-matcher.json create mode 100644 .github/actionlint-matcher.json diff --git a/.github/LICENSE.actionlint-matcher.json b/.github/LICENSE.actionlint-matcher.json new file mode 100644 index 000000000..a6c940dcb --- /dev/null +++ b/.github/LICENSE.actionlint-matcher.json @@ -0,0 +1,22 @@ +https://raw.githubusercontent.com/rhysd/actionlint/0ba78a0/LICENSE.txt + +the MIT License + +Copyright (c) 2021 rhysd + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/.github/actionlint-matcher.json b/.github/actionlint-matcher.json new file mode 100644 index 000000000..4613e1617 --- /dev/null +++ b/.github/actionlint-matcher.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "actionlint", + "pattern": [ + { + "regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$", + "file": 1, + "line": 2, + "column": 3, + "message": 4, + "code": 5 + } + ] + } + ] +} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 504fcae2e..9cf826891 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,6 +17,7 @@ jobs: env: ACTIONLINT: '${{ steps.install.outputs.executable }}' run: | + echo "::add-matcher::.github/actionlint-matcher.json" # TODO: move -ignores inline or to actionlint.yml once # https://www.github.com/rhysd/actionlint/issues/237 and/or # https://www.github.com/rhysd/actionlint/issues/217 is fixed.