[java] UnnecessaryImport: optionally ignore unused on-demand imports
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 5.5k
- Forks
- 1.6k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 54
Description
Rule: UnnecessaryImport (previously known as UnusedImport)
I like to use the UnusedImport rule to prevent developers from forget to delete imports not used anymore. However, I had to ignore this rule in my projects because I don't want to add every single import for a bunch of dependencies that a class have, I mean the use of the start * symbol. Would be nice if the UnusedImports rule could be configured to decide when I want to consider the star symbol or not.
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 UnnecessaryImport rule documentation and its implementation, focusing on how rule configuration distinguishes unused imports from on-demand imports. Check the existing rule tests and configuration entry points. Done means users can configure whether imports using the * symbol are considered by the rule, with tests covering both settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100