redhat-developer / redhat-developer/vscode-java
Import that is used in @code or @link in JavaDoc is marked as unused
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 546
- Avg merge
- 20h 1m
- Merged PRs (30d)
- 11
Description
Imports that are only used in @code or @link of JavaDoc are marked as unused and Organize imports will remove them.
Environment
- Operating System: 20.04.2 LTS (Focal Fossa)
- JDK version: openjdk 11.0.6 2020-01-14
- Visual Studio Code version: 1.58.2
- Java extension version: v.0.81.0
Steps To Reproduce
- Check out https://github.com/fvclaus/vscode-java-javadoc-link-bug and open
App.java - Run
Organize imports
import java.util.HashSet;
/**
* Uses {@code HashSet#clear()}
*
*/

Current Result
Import is marked as unused and will be removed with Organize imports.
Expected Result
Import is not marked as unused and will not be removed with Organize imports.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the App.java reproduction linked in the issue and run Organize imports to confirm how the HashSet reference in {@code} is handled. Trace the unused-import analysis and JavaDoc reference handling from that behavior. Done means imports used only in JavaDoc are not marked unused or removed by Organize imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100