summaryrefslogtreecommitdiff
path: root/docs/make.bat
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2025-06-01 22:38:04 +0100
committernessita <124304+nessita@users.noreply.github.com>2025-08-25 10:51:10 -0300
commitef2f16bc4824ca2b10b7f2845baf4d313c9c0da1 (patch)
tree01fc768fdf18155e41448422fff0d7683899879e /docs/make.bat
parent0246f478882c26bc1fe293224653074cd46a90d0 (diff)
Refs #36485 -- Added sphinx-lint support and make lint rule for docs.
This adds a `lint.py` script to run sphinx-lint on Django's docs files, a mathing `lint` target in the `docs/Makefile` and `docs/make.bat`, and updates `docs/requirements.txt` accordingly.
Diffstat (limited to 'docs/make.bat')
-rw-r--r--docs/make.bat12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/make.bat b/docs/make.bat
index 8376db57f0..27e3c1143d 100644
--- a/docs/make.bat
+++ b/docs/make.bat
@@ -36,6 +36,7 @@ if "%1" == "help" (
echo. doctest to run all doctests embedded in the documentation if enabled
echo. spelling to check for typos in documentation
echo. black to apply the black formatting to code blocks in documentation
+ echo. lint to check for linting errors in documentation
goto end
)
@@ -198,6 +199,11 @@ if "%1" == "black" (
goto end
)
+if "%1" == "lint" (
+ call :run_lint
+ goto end
+)
+
if "%1" == "check" (
call :run_black
call :run_spelling
@@ -221,4 +227,10 @@ if "%1" == "check" (
echo.Code blocks reformatted
exit /b
+:run_lint
+ python lint.py
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Documentation lint complete.
+
:end