[xwiki-contrib/documentation] 8cac5f: DA-89: Add a check for child pages listed in the R...
Branch: refs/heads/master Home: https://github.com/xwiki-contrib/documentation Commit: 8cac5fa8e7f7df5383433385d912f935affe40f5 https://github.com/xwiki-contrib/documentation/commit/8cac5fa8e7f7df53834333... Author: Vincent Massol <[email protected]> Date: 2026-10-06 (Tue, 06 Oct 2026) Changed paths: A documentation-xwikiorg/documentation-xwikiorg-api/src/main/java/org/xwiki/contrib/documentation/internal/xwikiorg/RelatedChildPageCheck.java M documentation-xwikiorg/documentation-xwikiorg-api/src/main/resources/META-INF/components.txt A documentation-xwikiorg/documentation-xwikiorg-api/src/test/java/org/xwiki/contrib/documentation/internal/xwikiorg/RelatedChildPageCheckTest.java Log Message: ----------- DA-89: Add a check for child pages listed in the Related field (#20) * Add the relatedChildPage check, which parses the Related field of the DocumentationClass object (including the content of macros holding wiki content), resolves every link relative to the current page and reports, as an Error, the links pointing to a direct child of the current page, since child pages are already listed in the More section. * A link is a direct child link when the parent of the linked page in the nested page hierarchy is the current page; only links to pages (doc:, page:, space: and untyped links) are considered, so links to an attachment of a child page, URLs, mailto, etc. are ignored, and terminal pages are never checked since they cannot have children. * Parse the Related field with the shared parseXPropertyXDOM() helper. * Add RelatedChildPageCheckTest covering nested, terminal, relative, page: and space: child links, grandchildren, siblings, self links, external and attachment links, links inside macros and parse failures. Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> To unsubscribe from these emails, change your notification settings at https://github.com/xwiki-contrib/documentation/settings/notifications
participants (1)
-
XWiki Notifications