diff options
| author | Natalia <124304+nessita@users.noreply.github.com> | 2026-02-27 11:19:20 -0300 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2026-03-02 15:05:31 -0300 |
| commit | 3f21cb06e76044ad753055700395e54a1fc4f1e9 (patch) | |
| tree | 780bdebe9255f347b26be5c9e1af875fc561ef26 /docs | |
| parent | ffa1dad378927396a5593cd9865c3f751fa59059 (diff) | |
Aligned docs checks between GitHub Actions and local development.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/Makefile | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/docs/Makefile b/docs/Makefile index 3545332a40..41ed522daf 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -171,16 +171,33 @@ 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 lint: $(PYTHON) lint.py @echo @echo "Documentation lint complete." -check: spelling black lint - @echo - @echo "Style and spelling checks completed." +check: + @echo "=== Spelling check ==="; \ + $(MAKE) --no-print-directory SPHINXOPTS="-q -W" spelling; SPELLING=$$?; \ + echo ""; \ + echo "=== Code formatting check ==="; \ + $(MAKE) --no-print-directory black; BLACK=$$?; \ + echo ""; \ + echo "=== Lint check ==="; \ + $(MAKE) --no-print-directory lint; LINT=$$?; \ + echo ""; \ + if [ $$SPELLING -ne 0 ] || [ $$BLACK -ne 0 ] || [ $$LINT -ne 0 ]; then \ + echo "Some checks failed."; \ + exit 1; \ + fi; \ + echo "All style and spelling checks passed." |
