diff --git a/.github/workflows/test-translations.yml b/.github/workflows/test-translations.yml index 537a8df72..4c96f47da 100644 --- a/.github/workflows/test-translations.yml +++ b/.github/workflows/test-translations.yml @@ -82,6 +82,6 @@ jobs: - name: Lint translation file if: always() - run: sphinx-lint locales/${LANGUAGE}/LC_MESSAGES/messages.po + run: nox -s sphinx_lint -- locales/${{ matrix.language }}/LC_MESSAGES/messages.po env: LANGUAGE: ${{ matrix.language }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1f67bad8e..96745a717 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,6 +29,7 @@ jobs: noxenv: - build - linkcheck + - sphinx_lint steps: - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 diff --git a/noxfile.py b/noxfile.py index 484a8d39a..4df82153d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -105,3 +105,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 or ["source"] + session.run("sphinx-lint", *target)