google_style.xml: support multiple config links per rule entry in XdocsPagesTest (original) (raw)
Problem
Detected at: #18986 (comment)
When adding a second check (BoxComments) to an existing rule entry (4.8.6.1 Block comment style) in google_style.xml, the XdocsPagesTest fails with:
XdocsPagesTest.testAllStyleRules:1962->validateStyleModules:2094->validateChapterWiseTesting:2198
google_style.xml rule '4.8.6.1 Block comment style' module 'BoxComments' has too many config links
Context
Rule 4.8.6.1 Block comment style is covered by two checks:
CommentsIndentationโ already has a doc link and config search linkBoxCommentsโ newly added, needs a config search link pointing to:
https://github.com/search?q=path%3Asrc%2Fmain%2Fresources%20path%3A**%2Fgoogle_checks.xml+repo%3Acheckstyle%2Fcheckstyle+BoxComments
Currently XdocsPagesTest.validateChapterWiseTesting only allows one config link per module entry in a rule row. This prevents adding the search link for BoxComments alongside CommentsIndentation in the same row.
Expected behavior
XdocsPagesTest should support multiple module entries per rule row, each with their own config search link, so that rules covered by more than one check can be properly documented.
Related
- PR Issue #17697: Add check for box comments #18986 โ adds
BoxCommentscheck for Google Style ยง4.8.6.1