Skip to content

Commit

Permalink
Static checks for html documentation
Browse files Browse the repository at this point in the history
This commit introduces the static checks for avocado documentation. This
change will help us avoid documentation issues in the future.

Reference: avocado-framework#5757
Signed-off-by: Jan Richter <[email protected]>
  • Loading branch information
richtja committed Nov 28, 2023
1 parent fbe7425 commit 3b75df1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) sou
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext check

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand All @@ -40,12 +40,13 @@ help:
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " check to check HTML generation"

clean:
-rm -rf $(BUILDDIR)

html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
$(SPHINXBUILD) -W --keep-going -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

Expand Down Expand Up @@ -154,3 +155,6 @@ doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

check: html clean
@echo "Testing of html in the sources finished."
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pyenchant==3.2.2
pylint==2.17.2
autopep8==1.6.0
black==22.3.0
sphinx==5.3.0

coverage==5.5

Expand Down
7 changes: 7 additions & 0 deletions selftests/doctest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh -e

(cd "./docs" && make -k check)

exit $?


0 comments on commit 3b75df1

Please sign in to comment.