Skip to content

False javadoc warning for valid @snippet tags #1583#5190

Open
kamilkrzywanski wants to merge 1 commit into
eclipse-jdt:masterfrom
kamilkrzywanski:issue_1583
Open

False javadoc warning for valid @snippet tags #1583#5190
kamilkrzywanski wants to merge 1 commit into
eclipse-jdt:masterfrom
kamilkrzywanski:issue_1583

Conversation

@kamilkrzywanski

Copy link
Copy Markdown
Contributor

Summary

  • Fixes false positive Javadoc: Description expected after @snippet when missingJavadocTagDescription=all_standard_tags.
  • Root cause: pushSnippetText / pushExternalSnippetText set tagWaitingForDescription to TAG_SNIPPET_VALUE instead of clearing it to NO_TAG_VALUE after snippet content was provided (comment already said "clear the flag").
  • Adds regression tests in JavadocTest_18 for valid snippets, snippets with attributes, and empty snippets.

Fixes #1583

Test plan

  • Reproduced the issue with ECJ using the prefs from the issue (all_standard_tags)
  • Verified valid snippets no longer warn after the fix
  • Verified empty {@snippet} still reports missing description
  • Ran JavadocTest_18 (52 tests, 0 failures) with the fix
  • Confirmed the new positive tests fail without the fix (8 failures) and pass with it

When missingJavadocTagDescription=all_standard_tags, valid {@snippet}
tags incorrectly reported "Description expected after @snippet" because
pushSnippetText/pushExternalSnippetText set tagWaitingForDescription to
TAG_SNIPPET_VALUE instead of clearing it to NO_TAG_VALUE after content
was provided. Add regression tests covering valid, attributed, and empty
snippets.

Fixes eclipse-jdt#1583

Signed-off-by: Kamil Krzywannski <kamilkrzywanski01@gmail.com>
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.

[18] False javadoc warning when using snippets and validate Missing Tag: "Description expected after @snippet"

1 participant