Skip to content

Commit 321abca

Browse files
committed
Add sphinx-lint check
1 parent d844cdc commit 321abca

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.github/workflows/test-translations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ jobs:
7878

7979
- name: Lint translation file
8080
if: always()
81-
run: sphinx-lint locales/${{ matrix.language }}/LC_MESSAGES/messages.po
81+
run: nox -s sphinx_lint -- locales/${{ matrix.language }}/LC_MESSAGES/messages.po

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ jobs:
2222
noxenv:
2323
- build
2424
- linkcheck
25+
- sphinx_lint
2526

2627
steps:
2728
- uses: actions/checkout@v3

noxfile.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,17 @@ def checkqa(session):
104104
"--all-files",
105105
"--show-diff-on-failure",
106106
)
107+
108+
109+
@nox.session()
110+
def sphinx_lint(session):
111+
"""
112+
Check for reST format issues in source rst files,
113+
accepting another path as positional argument.
114+
"""
115+
session.install("sphinx-lint==1.0.0")
116+
target = session.posargs if len(session.posargs) >= 1 else ["source"]
117+
session.run(
118+
"sphinx-lint",
119+
*target
120+
)

0 commit comments

Comments
 (0)