summaryrefslogtreecommitdiff
path: root/docs/Makefile
diff options
context:
space:
mode:
authorNatalia <124304+nessita@users.noreply.github.com>2026-02-27 11:19:20 -0300
committerNatalia <124304+nessita@users.noreply.github.com>2026-03-02 15:10:49 -0300
commit1db60ed34f869c3f5aa3f7f861532813a46cc9d8 (patch)
treeee3284950f59e1e7fa5841983f6bc923879f1ff9 /docs/Makefile
parent703777cbbc268f62083c703fa27fa582b54bcc93 (diff)
[5.2.x] Aligned docs checks between GitHub Actions and local development.
Backport of 3f21cb06e76044ad753055700395e54a1fc4f1e9 from main.
Diffstat (limited to 'docs/Makefile')
-rw-r--r--docs/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/Makefile b/docs/Makefile
index 9935ad09e5..98fdfc8cb7 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -170,10 +170,15 @@ spelling:
black:
@mkdir -p $(BUILDDIR)/black
- find . -name "*.txt" -not -path "./_build/*" -not -path "./_theme/*" \
+ @find . -name "*.txt" -not -path "./_build/*" -not -path "./_theme/*" \
| xargs blacken-docs --rst-literal-block; echo $$? > "$(BUILDDIR)/black/output.txt"
- @echo
- @echo "Code blocks reformatted"
+ @RESULT=`cat $(BUILDDIR)/black/output.txt`; \
+ if [ "$$RESULT" -gt 0 ]; then \
+ echo "💥 📢 Code blocks in documentation must be reformatted with blacken-docs 📢 💥"; \
+ exit $$RESULT; \
+ else \
+ echo "Code blocks in documentation are properly formatted ✅"; \
+ fi
check: spelling black
@echo