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 suppressing a warning of non-matching glob pattern in TOC #13230

Merged
merged 8 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Contributors
* \A. Rafey Khan -- improved intersphinx typing
* Roland Meister -- epub builder
* Sebastian Wiesner -- image handling, distutils support
* Slawek Figiel -- additional warning suppression
* Stefan Seefeld -- toctree improvements
* Stefan van der Walt -- autosummary extension
* \T. Powers -- HTML output improvements
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ Features added
Patch by Adam Turner.
* #13065: Enable colour by default in when running on CI.
Patch by Adam Turner.
* 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.

Bugs fixed
----------
Expand Down
3 changes: 3 additions & 0 deletions doc/usage/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1393,6 +1393,7 @@ Options for warning control
* ``misc.copy_overwrite``
* ``misc.highlighting_failure``
* ``toc.circular``
* ``toc.empty_glob``
* ``toc.excluded``
* ``toc.no_title``
* ``toc.not_readable``
Expand Down Expand Up @@ -1449,6 +1450,8 @@ Options for warning control
.. versionadded:: 8.2
Added ``duplicate_declaration.c`` and ``duplicate_declaration.cpp``.

.. versionadded:: 8.2
Added ``toc.empty_glob``.

Builder options
===============
Expand Down
1 change: 1 addition & 0 deletions sphinx/directives/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def parse_content(self, toctree: addnodes.toctree) -> None:
__("toctree glob pattern %r didn't match any documents"),
entry,
location=toctree,
subtype='empty_glob',
)

for docname in doc_names:
Expand Down
Loading