Skip to content

Issue #18435: Fix xdocs AST consistency for ParameterName examples#19453

Merged
romani merged 1 commit into
checkstyle:masterfrom
surajgojanur:issue-18435-missingoverride
Mar 25, 2026
Merged

Issue #18435: Fix xdocs AST consistency for ParameterName examples#19453
romani merged 1 commit into
checkstyle:masterfrom
surajgojanur:issue-18435-missingoverride

Conversation

@surajgojanur

Copy link
Copy Markdown
Contributor

Fixes #18435

Problem:
XdocsExamplesAstConsistencyTest has an entry for
"checks/naming/parametername/Example2" in SUPPRESSED_EXAMPLES.

Analysis:
Example1 and Example2 for ParameterName check had different AST structures.
This caused the example to be suppressed instead of being aligned.

Solution:

  • Updated Example1 to match the AST structure of Example2
  • Preserved the original violation for parameter 'V2' to keep test expectations unchanged
  • Removed the corresponding entry from SUPPRESSED_EXAMPLES

Verification:

  • ./mvnw clean verify -Djacoco.skip=true passes
  • XdocsExamplesAstConsistencyTest passes

No breaking changes introduced

@ZaheerAhmadDev

Copy link
Copy Markdown
Contributor

Github, generate website

@ZaheerAhmadDev

ZaheerAhmadDev commented Mar 25, 2026

Copy link
Copy Markdown
Contributor

@surajgojanur, Remove example 3 and 4 from Suppression also, add override method in both Example 1,4,2 only add Example 5 in suppression as it serve different purpose.
Please share diffchecker link of Examples also See at:(#19351)

@surajgojanur surajgojanur force-pushed the issue-18435-missingoverride branch from 9bb8a48 to 70953a6 Compare March 25, 2026 12:49
@surajgojanur

Copy link
Copy Markdown
Contributor Author

Changes made:

  • removed Example3 and Example4 from suppression
  • kept only Example5 in suppression since it serves a different purpose
  • added the override-method structure in Example1, Example2, and Example4
  • updated related example tests and xdoc output to keep everything in sync

@surajgojanur

Copy link
Copy Markdown
Contributor Author

@surajgojanur, Remove example 3 and 4 from Suppression also, add override method in both Example 1,4,2 only add Example 5 in suppression as it serve different purpose. Please share diffchecker link of Examples also See at:(#19351)

done thank u for the review

@romani

romani commented Mar 25, 2026

Copy link
Copy Markdown
Member

Github, generate website

@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.

Let's move forward
But we have a gap in validation #19458

@romani romani merged commit 020fcd0 into checkstyle:master Mar 25, 2026
121 of 123 checks passed
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.

Fix xdocs Examples AST Consistency Test (Reduce suppressions list)

3 participants