Skip to content

Commit

Permalink
Fix sphinx docs linting
Browse files Browse the repository at this point in the history
  • Loading branch information
snejus committed Jun 11, 2024
1 parent c2a13ee commit a4b32ac
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
15 changes: 15 additions & 0 deletions .github/sphinx-problem-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"problemMatcher": [
{
"owner": "sphinx",
"pattern": [
{
"regexp": "^([^:]+):(\\d+): (WARNING: )?(.+)$",
"file": 1,
"line": 2,
"message": 4
}
]
}
]
}
12 changes: 8 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a4b32ac

Please sign in to comment.