Skip to content

test:Add validation tests for filters in Xdocs and update PMD configu…#17248

Closed
Harsh-kumar-jha wants to merge 1 commit into
checkstyle:masterfrom
Harsh-kumar-jha:improve-xdocs-filter-validation
Closed

test:Add validation tests for filters in Xdocs and update PMD configu…#17248
Harsh-kumar-jha wants to merge 1 commit into
checkstyle:masterfrom
Harsh-kumar-jha:improve-xdocs-filter-validation

Conversation

@Harsh-kumar-jha

Copy link
Copy Markdown

Changes Made #17176

I found the filters exclusion logic in XdocsPagesTest.java line 375-376 and noticed it lacked explanation. Based on the code analysis:

  • Filters are excluded because they're not in the main checks.xml file
  • Added explanatory comment to clarify this design decision
  • Created dedicated test method testFiltersIndexPageTable() for filters validation
  • This ensures filters table structure is properly validated going forward

Testing

  • New test validates filters table structure
  • Existing tests continue to pass
  • Filters exclusion now has clear documentation

@romani romani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks a lot !!!

item to improve:

assertWithMessage("Filter description for " + filterName
+ " in filters/index.xml should end with a period")
.that(description.charAt(description.length() - 1))
.isEqualTo('.');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please make filter special imlementation of readSummaries() to do same assert as we do for Checks.

assertWithMessage("The summary for check " + checkName
                        + " in the file \"" + path + "\""
                        + " should match the summary"
                        + " for this check in the file \"" + AVAILABLE_CHECKS_PATH + "\"")
                    .that(description)
                    .isEqualTo(summaries.get(checkName));

@romani

romani commented Jun 22, 2025

Copy link
Copy Markdown
Member

Please read and watch videos at Starting_Development.
Please make CI green.

there are video on how to make commit and how to investigate CI failures.

@romani

romani commented Jul 16, 2025

Copy link
Copy Markdown
Member

@Harsh-kumar-jha , please find time to finish PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants