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

Feature request: add ability to exclude/ignore external image warnings #2466

Closed
jputrino opened this issue Apr 18, 2016 · 5 comments
Closed
Assignees
Milestone

Comments

@jputrino
Copy link

jputrino commented Apr 18, 2016

It would be nice to be able to exclude or ignore the warnings that are triggered by external images.

Example:

Running Sphinx v1.4
making output directory...
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 14 source files that are out of date
updating environment: 14 added, 0 changed, 0 removed
reading sources... [100%] troubleshooting
README.rst:33: WARNING: nonlocal image URI found: https://readthedocs.org/projects/f5-openstack-lbaasv2/badge/?version=latest
README.rst:37: WARNING: nonlocal image URI found: https://f5-openstack-slack.herokuapp.com/badge.svg

See #2429 (where I and another user ran into the same problem when trying to turn off these warnings ourselves). There are enough results about this same issue that come up in a google search to suggest that many others would probably benefit from this option as well.

My use case:
The projects I document use travis-ci; I'd like to be able to use the sphinx-build -W command as part of our builds. I use a travis badge and a slack badge on some of our pages, which trigger the nonlocal image URI warnings; these would break the build (unnecessarily, IMHO), so I can't use the option to treat sphinx warnings as errors in our builds.

@tk0miya
Copy link
Member

tk0miya commented Apr 19, 2016

Thank you for reporting.

I wonder which branch is best to fix this. Anyway, I will add a way to suppress the warning.

@jputrino
Copy link
Author

Thanks!

@tk0miya
Copy link
Member

tk0miya commented Apr 21, 2016

Note:
I discussed with @shimizukawa about target branch. And we decided to fix this in stable branch.

@tk0miya tk0miya added this to the 1.4.2 milestone Apr 21, 2016
@tk0miya tk0miya self-assigned this Apr 21, 2016
tk0miya added a commit that referenced this issue Apr 22, 2016
@tk0miya
Copy link
Member

tk0miya commented Apr 22, 2016

I added new types to suppress_warnings at 52c7867.
After this, you can suppress the warnings with following configuration:

suppress_warnings = ['image.nonlocal_uri']

Thank you for reporting!

@tk0miya tk0miya closed this as completed Apr 22, 2016
@jputrino
Copy link
Author

Awesome, thanks!

openstack-gerrit pushed a commit to openstack/neutron-lib that referenced this issue Dec 6, 2016
Change [1] introduced a remote image link in our
README.rst. Due to the fact that we include this
README in our docs, our 'tox -e docs' build now
fails due to the nonlocal image URI as we run the
sphinx build with -W:

--
Warning, treated as error:
README.rst:None: WARNING: nonlocal image URI found:
http://governance.openstack.org/badges/neutron-lib.svg
--

Ignoring specific warnings is supported with newer
versions of sphinx [2], but not with the version we
currently use.

Therefore this patch removes our readme reference
from our doc/source/ tree.

[1] https://review.openstack.org/#/c/402702/
[2] sphinx-doc/sphinx#2466

Change-Id: I8458635f7081ea98a160cbb4105032d435bdcb98
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants