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

Allow selectively suppressing warnings #1345

Closed
shimizukawa opened this issue Jan 3, 2015 · 5 comments
Closed

Allow selectively suppressing warnings #1345

shimizukawa opened this issue Jan 3, 2015 · 5 comments
Labels
type:enhancement enhance or introduce a new feature
Milestone

Comments

@shimizukawa
Copy link
Member

Hello,

When using markup like :envvar:, I often do not have a corresponding reference target (e.g. when referring to LD_CONFIG or PATH). This leaves me with the choice of either getting a spurious warning during build, or not tagging these variables correctly.

It would be great if Sphinx would allow me to selectively suppress such warnings. I imagine the least intrusive change would be to just introduce a list of "known missing" targets in conf.py. If a target is missing, sphinx would check this list and only issue a warning if the target is not in there.


@shimizukawa shimizukawa added this to the 1.3 milestone Jan 3, 2015
@shimizukawa shimizukawa added the type:enhancement enhance or introduce a new feature label Jan 3, 2015
@shimizukawa
Copy link
Member Author

From Georg Brandl on 2014-01-12 19:22:36+00:00

A "known missing" config value seems easy to do and reasonable.

@shimizukawa
Copy link
Member Author

From Georg Brandl on 2014-01-12 19:30:59+00:00

Actually, there is already the nitpick_ignore list. Does that do what you want?

@shimizukawa
Copy link
Member Author

From Georg Brandl on 2014-01-12 19:43:33+00:00

I think it should do, with two little fixes I'll do shortly:

  • when changing nitpick_ignore, you had to do "make clean" before Sphinx gets the new value, with the fix it works with normal incremental rebuild.
  • for "std" domain roles you would have to use an entry like ('std:envvar', 'LD_CONFIG'); with the fix you can also use ('envvar', 'LD_CONFIG').

@shimizukawa
Copy link
Member Author

From Nikolaus Rath on 2014-01-12 19:59:52+00:00

Awesome, thanks a lot! I actually didn't know about nitpick_ignore.

@shimizukawa
Copy link
Member Author

From Georg Brandl on 2014-01-12 20:09:21+00:00

I've made it a little more conspicuous now by mentioning it where the -n command line switch is documented, and I've pushed the fixes I spoke of in c66d03eed714. My pleasure :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

1 participant