Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat sphinx warnings as errors #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

samsrabin
Copy link

This PR makes it so that, by default, the sphinx command called (via the Makefile) by build_docs treats warnings as errors. The build will still complete, but the exit code will be 1 instead of 0, and the "The HTML pages are in" message won't appear.

Users can disable this behavior with the new -w/--warnings-as-warnings flag.

Tested in the CTSM repo with deliberately-bad restructuredText (invalid references) with flags: -d, -d -w, -w, and neither. Additional independent testing would be smart, I think, as I was using a custom Docker container for the -d tests.

samsrabin added a commit to samsrabin/CTSM that referenced this pull request Oct 8, 2024
* Treats Sphinx warnings as errors (see also PR at ESMCI/doc-builder#4)
* Points at my Docker container, which includes Python package needed for mdinclude in .rst files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant