Suppress a given warning type based on what directory it is in
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
Also discussed here: https://github.com/orgs/sphinx-doc/discussions/12834