summaryrefslogtreecommitdiff
path: root/docs/make.bat
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2025-06-25 21:40:07 +0100
committernessita <124304+nessita@users.noreply.github.com>2025-08-05 12:18:19 -0300
commit7f9bf357feac06bb34017e1f6c7a7730b1991ede (patch)
treeca1e1b08de5b2e204e40e4573d69a3e7ea1e7b7e /docs/make.bat
parentcba73281966c816824c9bfa028a1bf44e188ded2 (diff)
Refs #36485 -- Grouped docs checks under a unified make check target.
Added a new 'check' rule to the docs Makefile which runs both the black and spelling checks.
Diffstat (limited to 'docs/make.bat')
-rw-r--r--docs/make.bat28
1 files changed, 22 insertions, 6 deletions
diff --git a/docs/make.bat b/docs/make.bat
index 72d71136c2..8376db57f0 100644
--- a/docs/make.bat
+++ b/docs/make.bat
@@ -189,20 +189,36 @@ results in %BUILDDIR%/doctest/output.txt.
)
if "%1" == "spelling" (
- %SPHINXBUILD% -b spelling %ALLSPHINXOPTS% %BUILDDIR%/spelling
- if errorlevel 1 exit /b 1
- echo.
- echo.Check finished. Wrong words can be found in %BUILDDIR%/^
-spelling/output.txt.
+ call :run_spelling
goto end
)
if "%1" == "black" (
+ call :run_black
+ goto end
+)
+
+if "%1" == "check" (
+ call :run_black
+ call :run_spelling
+ echo.
+ echo.All checks completed.
+ goto end
+)
+
+:run_spelling
+ %SPHINXBUILD% -b spelling %ALLSPHINXOPTS% %BUILDDIR%/spelling
+ if errorlevel 1 exit /b 1
+ echo.
+ echo.Check finished. Wrong words can be found in %BUILDDIR%/spelling/output.txt.
+ exit /b
+
+:run_black
for /f "usebackq tokens=*" %%i in (`dir *.txt /s /b ^| findstr /v /c:"_build" /c:"_theme"`) do (
blacken-docs --rst-literal-block %%i
)
echo.
echo.Code blocks reformatted
-)
+ exit /b
:end