-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 suppressing a warning of non-matching glob pattern in TOC #13230
Conversation
AUTHORS.rst
Outdated
@@ -106,6 +106,7 @@ Contributors | |||
* Vince Salvino -- JavaScript search improvements | |||
* Will Maier -- directory HTML builder | |||
* Zac Hatfield-Dodds -- doctest reporting improvements, intersphinx performance | |||
* Slawek Figiel -- additional warning suppression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please sort your name alphabetically in the list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, done.
CHANGES.rst
Outdated
* Add a subtype ``toc.glob_not_matching`` to a warning of a non-matching glob | ||
pattern in TOC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe why the change is being made, rather than what it does
* Add a subtype ``toc.glob_not_matching`` to a warning of a non-matching glob | |
pattern in TOC. | |
* Allow supressing warnings from the :rst:dir`toctree` directive when a glob pattern | |
doesn't match any documents, via the new ``toc.glob_not_matching`` warning sub-type. | |
Patch by Slawek Figiel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I've rephrased the sentence a bit.
doc/usage/configuration.rst
Outdated
@@ -1397,6 +1397,7 @@ Options for warning control | |||
* ``toc.no_title`` | |||
* ``toc.not_readable`` | |||
* ``toc.secnum`` | |||
* ``toc.glob_not_matching`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps?
* ``toc.glob_not_matching`` | |
* ``toc.empty_glob`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've applied your suggestion.
doc/usage/configuration.rst
Outdated
.. versionadded:: 8.2 | ||
Added ``duplicate_declaration.c`` and ``duplicate_declaration.cpp``. | ||
|
||
Added ``duplicate_declaration.c`` and ``duplicate_declaration.cpp``, and | ||
``toc.glob_not_matching``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please split this into a new versionadded
directive
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
I've rebased it on the current master. |
Thank you! A |
Purpose
Some documentation files are created dynamically in my project. They are included in TOC by the glob pattern. The number of included files varies and may be zero.
I have enabled the
--fail-on-warning
that I found very helpful in improving the quality of my documentation. However, it interrupts the documentation build when the glob pattern matches no entries in any TOC, which is not an error in my project.Unfortunately, the related warning has no subtype specified, and it cannot be suppressed using the
suppress_warnings
list.References
No references. I haven't created an issue.