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