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:

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.