Issue #19458: Detect parameter differences in xdocs AST consistency#19461
Issue #19458: Detect parameter differences in xdocs AST consistency#19461surajgojanur wants to merge 1 commit into
Conversation
romani
left a comment
There was a problem hiding this comment.
Please revert special tests.
Examples are out live tests
| } | ||
|
|
||
| @Test | ||
| public void testParameterNameDifferencesAreDetected() throws CheckstyleException { |
There was a problem hiding this comment.
We don't need tests, fact that examples are back suppression is good test, live tests
There was a problem hiding this comment.
Addressed.
I reverted the custom handcrafted tests from XdocsExamplesAstConsistencyTest as requested and kept the actual fix for parameter-difference detection in the AST consistency logic.
The PR now relies on the live examples/suppression behavior as the proof signal.
Validation:
./mvnw clean -Djacoco.skip=true -Dtest=XdocsExamplesAstConsistencyTest test./mvnw clean verify
Both pass.
9628260 to
0385c22
Compare
| boolean compareText) { | ||
| this.type = type; | ||
| if (ignoreText) { | ||
| if (ignoreText || !compareText) { |
There was a problem hiding this comment.
Refactor to remove compareText from method signature.
ignoreText should be calculated by this ||
There was a problem hiding this comment.
I removed compareText from the StructuralAstNode constructor and moved the combined ignoreText logic to the call site
3742289 to
c271fb5
Compare
c271fb5 to
aab1096
Compare
Fixes #19458
Summary
This PR updates xdocs AST consistency comparison so meaningful token text differences are detected, including method parameter-name differences, while still ignoring comment-only differences.
Details
parameternameexamples were restored inSUPPRESSED_EXAMPLESbecause they now correctly register as structural mismatches.Validation
./mvnw clean -Djacoco.skip=true -Dtest=XdocsExamplesAstConsistencyTest test./mvnw clean verify