[xwiki-contrib/documentation] c2e09d: DA-90: Add a check for the label format of links i...
Branch: refs/heads/da-90-related-link-label Home: https://github.com/xwiki-contrib/documentation Commit: c2e09d09332873fef888d6947c9af717f6d1aa83 https://github.com/xwiki-contrib/documentation/commit/c2e09d09332873fef888d6... Author: Vincent Massol <[email protected]> Date: 2026-10-07 (Wed, 07 Oct 2026) Changed paths: A documentation-xwikiorg/documentation-xwikiorg-api/src/main/java/org/xwiki/contrib/documentation/internal/xwikiorg/RelatedLinkLabelCheck.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/RelatedLinkLabelCheckTest.java Log Message: ----------- DA-90: Add a check for the label format of links in the Related field * Add the relatedLinkLabel check, which parses the Related field of the DocumentationClass object (including the content of macros holding wiki content) and, for every link whose label contains "(for ", reports a Warning when the label is not exactly "<title> (for <target>)". * The expected title is the title of the linked page and the expected target is the audience of its DocumentationClass object (user, administrator, developer mapped to User, Administrator, Developer). The linked page is resolved relative to the current page and loaded through the XWikiContext. * When the linked page cannot be loaded, does not exist, or has no title or target, only what can be verified is checked: the label's own title is kept and the target must be one of User, Administrator or Developer. * Add RelatedLinkLabelCheckTest covering valid labels, wrong capitalization, invalid and mismatched targets, trailing text, missing or partial linked pages, external links, links inside macros, and parse and load 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