From c2043dad7fbc37e628587a00df074655b9554306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0ar=C5=ABnas=20Nejus?= Date: Sat, 2 Aug 2025 19:21:10 +0100 Subject: [PATCH] Reorganize problem matchers --- .github/problem-matchers/sphinx-build.json | 16 +++++++++++ .github/problem-matchers/sphinx-lint.json | 17 ++++++++++++ .github/sphinx-problem-matcher.json | 32 ---------------------- .github/workflows/lint.yml | 6 ++-- 4 files changed, 37 insertions(+), 34 deletions(-) create mode 100644 .github/problem-matchers/sphinx-build.json create mode 100644 .github/problem-matchers/sphinx-lint.json delete mode 100644 .github/sphinx-problem-matcher.json diff --git a/.github/problem-matchers/sphinx-build.json b/.github/problem-matchers/sphinx-build.json new file mode 100644 index 000000000..aff752ae9 --- /dev/null +++ b/.github/problem-matchers/sphinx-build.json @@ -0,0 +1,16 @@ +{ + "problemMatcher": [ + { + "owner": "sphinx-build", + "severity": "error", + "pattern": [ + { + "regexp": "^(/[^:]+):((\\d+):)?(\\sWARNING:)?\\s*(.+)$", + "file": 1, + "line": 3, + "message": 5 + } + ] + } + ] +} diff --git a/.github/problem-matchers/sphinx-lint.json b/.github/problem-matchers/sphinx-lint.json new file mode 100644 index 000000000..44e93e886 --- /dev/null +++ b/.github/problem-matchers/sphinx-lint.json @@ -0,0 +1,17 @@ +{ + "problemMatcher": [ + { + "owner": "sphinx-lint", + "severity": "error", + "pattern": [ + { + "regexp": "^([^:]+):(\\d+):\\s+(.*)\\s\\(([a-z-]+)\\)$", + "file": 1, + "line": 2, + "message": 3, + "code": 4 + } + ] + } + ] +} diff --git a/.github/sphinx-problem-matcher.json b/.github/sphinx-problem-matcher.json deleted file mode 100644 index 6bd8ed70c..000000000 --- a/.github/sphinx-problem-matcher.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "sphinx-build", - "pattern": [ - { - "regexp": "^([^:]+):\\s(.+)$", - "file": 1, - "message": 2 - }, - { - "regexp": "^([^:]+):(\\d+):\\s(.+)$", - "file": 1, - "line": 2, - "message": 3 - } - ] - }, - { - "owner": "sphinx-lint", - "pattern": [ - { - "regexp": "^([^:]+):(\\d+):\\s+(.*)\\s\\(([a-z-]+)\\)$", - "file": 1, - "line": 2, - "message": 3, - "code": 4 - } - ] - } - ] -} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index dce45a2dd..3a893e455 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -131,8 +131,10 @@ jobs: - name: Install dependencies run: poetry install --extras=docs - - name: Add Sphinx problem matcher - run: echo "::add-matcher::.github/sphinx-problem-matcher.json" + - name: Add Sphinx problem matchers + run: | + echo "::add-matcher::.github/problem-matchers/sphinx-build.json" + echo "::add-matcher::.github/problem-matchers/sphinx-lint.json" - name: Lint docs run: poe lint-docs