Skip to content

google_style.xml: support multiple config links per rule entry in XdocsPagesTest #19892

@smita1078

Description

@smita1078

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 link
  • BoxComments — 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions