Repository navigation
docs: Fix duplicate toctree references causing build warnings - #19027
Merged
Merged
Conversation
RogerNext
force-pushed
the
fix/doc-toctree-warnings
branch
from
June 3, 2026 00:35
e9f60e0 to
d96fd47
Compare
linguini1
requested changes
Jun 3, 2026
Several documentation files are referenced in multiple toctrees, causing Sphinx build warnings like: document is referenced in multiple toctrees: [...], selecting: [...] Fix by narrowing glob patterns in parent toctrees to only match subdirectory index files, and replacing a toctree directive with a :doc: cross-reference: - platforms/arm/index.rst: glob */* -> */index - platforms/index.rst: glob */* -> */index - guides/changing_systemclockconfig.rst: toctree -> :doc: ref Fixes apache#14785 Signed-off-by: hanzj <[email protected]>
RogerNext
force-pushed
the
fix/doc-toctree-warnings
branch
from
June 3, 2026 02:07
d96fd47 to
a48ffb7
Compare
RogerNext
commented
Jun 3, 2026
RogerNext
left a comment
Contributor
Author
There was a problem hiding this comment.
Addressed: rebased onto upstream/master, the unrelated usrsock change is now removed. Only the 4 documentation files are modified.
xiaoxiang781216
approved these changes
Jun 3, 2026
linguini1
approved these changes
Jun 3, 2026
lupyuen
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Sphinx documentation build warnings caused by documents referenced in multiple toctrees.
Fixes #14785
Problem
Several
.rstfiles are referenced by both a parent toctree (via glob pattern) and a child toctree (explicit entry), causing Sphinx warnings:Affected files:
components/drivers/special/power/pm/index.rstplatforms/arm/goldfish/goldfish_timer.rstplatforms/arm/nrf52/ieee802154.rstplatforms/sim/network_linux.rstplatforms/sim/network_vpnkit.rstFix
platforms/arm/index.rst: Narrow glob pattern from*/*to*/index— only match subdirectory index files, not their children.platforms/index.rst: Same glob narrowing from*/*to*/index.guides/changing_systemclockconfig.rst: Replace.. toctree::directive with:doc:cross-reference, since this is a guide page that links to PM docs, not a structural parent.These are the only non-index
.rstfiles at the affected directory levels, so the narrowed globs remain functionally equivalent while eliminating the duplicate references.Testing
Verified that no other non-index
.rstfiles exist at the affected directory levels that would be missed by the narrowed glob patterns.