Skip to content

Commit e6aa320

Browse files
committed
Add sphinx-lint check
1 parent 453e2cd commit e6aa320

3 files changed

Lines changed: 16 additions & 1 deletion

File tree

‎.github/workflows/test-translations.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,6 @@ jobs:
8282

8383
- name: Lint translation file
8484
if: always()
85-
run: sphinx-lint locales/${LANGUAGE}/LC_MESSAGES/messages.po
85+
run: nox -s sphinx_lint -- locales/${{ matrix.language }}/LC_MESSAGES/messages.po
8686
env:
8787
LANGUAGE: ${{ matrix.language }}

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
noxenv:
3030
- build
3131
- linkcheck
32+
- sphinx_lint
3233

3334
steps:
3435
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

‎noxfile.py‎

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

0 commit comments

Comments
 (0)