sphinx icon indicating copy to clipboard operation
sphinx copied to clipboard

Suppress a given warning type based on what directory it is in

Open menelik003 opened this issue 1 year ago • 1 comments

I am generating API documentation using autoapi.extension in Sphinx. It is a large repo, and not all of the doc strings are well formatted and this generates a lot of sphinx docutils warnings. However I also want sphinx to fail on warnings for the rst files that are manually written. The autogenerated api docs get written to a specific directory, so I was wondering if there could be a way to ignore warnings just in that specific directory.

Currently I am suppressing all docutil warnings with the suppressed_warnings in the conf.py. Fixing all of the doc strings in the repo is not really an option, as this is a large repo with a lot of people contributing.

Thank you

menelik003 avatar Sep 03 '24 20:09 menelik003

Also discussed here: https://github.com/orgs/sphinx-doc/discussions/12834

jdillard avatar Oct 01 '24 19:10 jdillard