From 321abcad457fbecd25fd6d248bb687e145b5d570 Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Tue, 4 Feb 2025 13:52:59 -0300 Subject: [PATCH 1/2] Add sphinx-lint check --- .github/workflows/test-translations.yml | 2 +- .github/workflows/test.yml | 1 + noxfile.py | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) 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..035962c0a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -104,3 +104,17 @@ 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 + ) From 9dc43610e494e31aed5ec7109b9e1578f64f8bb7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 17:19:44 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- noxfile.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/noxfile.py b/noxfile.py index 035962c0a..1a3a64d83 100644 --- a/noxfile.py +++ b/noxfile.py @@ -114,7 +114,4 @@ def sphinx_lint(session): """ session.install("sphinx-lint==1.0.0") target = session.posargs if len(session.posargs) >= 1 else ["source"] - session.run( - "sphinx-lint", - *target - ) + session.run("sphinx-lint", *target)