Fix sphinx docs linting

This commit is contained in:
Šarūnas Nejus 2024-06-12 10:51:58 +01:00
parent c2a13ee4b1
commit 0507f6f7c1
No known key found for this signature in database
GPG key ID: DD28F6704DBE3435
2 changed files with 23 additions and 4 deletions

15
.github/sphinx-problem-matcher.json vendored Normal file
View file

@ -0,0 +1,15 @@
{
"problemMatcher": [
{
"owner": "sphinx",
"pattern": [
{
"regexp": "^([^:]+):(\\d+): (WARNING: )?(.+)$",
"file": 1,
"line": 2,
"message": 4
}
]
}
]
}

View file

@ -118,7 +118,11 @@ jobs:
- name: Install dependencies
run: poetry install --only=docs
- uses: sphinx-doc/github-problem-matcher@master
name: Build docs
with:
run: poe docs
- name: Add Sphinx problem matcher
run: echo "::add-matcher::.github/sphinx-problem-matcher.json"
- name: Build docs
run: |
poe docs |& tee /tmp/output
# fail the job if there are issues
grep -q " WARNING:" /tmp/output && exit 1 || exit 0