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

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

samsrabin
Copy link
Collaborator

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
@samsrabin
Copy link
Collaborator Author

@billsacks Do you think we could discuss this at some point soon?

@billsacks
Copy link
Member

Sure, I'd be happy to talk with you about this. Thurs afternoon or sometime Friday would be best for me this week. I definitely like this idea!

@billsacks billsacks merged commit 1ba1c1f into ESMCI:master Oct 31, 2024
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.

2 participants