You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now it is time to migrate WriteTagCheck Check to use AST, rather than regexp for parsing of javadoc.
Whole design should stay as is, same properties.
But check should extend extends AbstractJavadocCheck and do all logic based on AST nodes.
There are already bunch of Checks that doing this, so look around for examples.
Hi @romani , I am trying to rewrite the check using Javadoc AST, but am struggling to find a way to implement the tagFormat option. tagFormat is a user-specified regexp to match raw texts that appear after block tags, but I found getting these raw texts rather tricky.
What I have tried
Instinctively I tried to get the texts from TEXT under DESCRIPTION:
Activity
lithops-zty commentedon Mar 8, 2026
I'm on it.
lithops-zty commentedon Mar 8, 2026
Hi @romani , I am trying to rewrite the check using Javadoc AST, but am struggling to find a way to implement the
tagFormatoption.tagFormatis a user-specified regexp to match raw texts that appear after block tags, but I found getting these raw texts rather tricky.What I have tried
Instinctively I tried to get the texts from
TEXTunderDESCRIPTION:The problem
The above approach fails in various cases:
@param var description:description text does not contain the variable name which is stored separately;
@return <p>some html</p>:DESCRIPTIONhas noTEXTbut parsedHTML_ELEMENT@see java.lang.Object:@seehas noDESCRIPTIONbut aREFERENCEnode.It seems very hard to reconstruct raw texts from parsed AST nodes. May I know if there is a simple way to get the raw texts?
romani commentedon Mar 8, 2026
No simple way, each tag will have special way to be flattened back to string.
But you have all in tree, just a bit more java code to be written
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
romani commentedon Mar 15, 2026
pay attention for #18059
where we remove finals from methods of
src/main/java/com/puppycrawl/tools/checkstyle/checks/javadoc/AbstractJavadocCheck.java
if required apply same to your PR to let continue
Krish-876 commentedon Mar 20, 2026
Hi, I see there is draft PR but no updates recently.
Are you still actively working on this?
If not I would like to help or continue.
lithops-zty commentedon Mar 20, 2026
Hi @Krish-876 Thank you for your interest in helping with this issue! I am working on this now and will complete the PR soon.
Krish-876 commentedon Mar 20, 2026
Thanks for the update
I’ll step back from this issue then. Please let me know if any help is needed.
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
16 remaining items
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
romani commentedon Jul 17, 2026
fix for issue is at #19193 is almost done, waiting for author to followup.
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue checkstyle#19150: Update WriteTagCheck to use AST of Javadoc
Issue #19150: Update WriteTagCheck to use AST of Javadoc