diff --git a/.github/workflows/test-translations.yml b/.github/workflows/test-translations.yml index 45dc60aa3..5c8c5a437 100644 --- a/.github/workflows/test-translations.yml +++ b/.github/workflows/test-translations.yml @@ -78,4 +78,4 @@ jobs: - name: Lint translation file if: always() - run: sphinx-lint locales/${{ matrix.language }}/LC_MESSAGES/messages.po + run: nox -s sphinx_lint -- locales/${{ matrix.language }}/LC_MESSAGES/messages.po diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8503ca720..75eefaacc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,7 @@ jobs: noxenv: - build - linkcheck + - sphinx_lint steps: - uses: actions/checkout@v3 diff --git a/noxfile.py b/noxfile.py index 698e82f9d..1a3a64d83 100644 --- a/noxfile.py +++ b/noxfile.py @@ -104,3 +104,14 @@ def checkqa(session): "--all-files", "--show-diff-on-failure", ) + + +@nox.session() +def sphinx_lint(session): + """ + Check for reST format issues in source rst files, + accepting another path as positional argument. + """ + session.install("sphinx-lint==1.0.0") + target = session.posargs if len(session.posargs) >= 1 else ["source"] + session.run("sphinx-lint", *target)