Allow selectively suppressing warnings

Nikolaus Rath avatarNikolaus Rath created an issue

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.

Comments (5)

  1. Georg Brandl

    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').
  2. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.