-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
false positive from no-unused-imports
when importing an inner declaration with wildcard
#1393
Labels
Milestone
Comments
paul-dingemans
added a commit
to paul-dingemans/ktlint
that referenced
this issue
Mar 5, 2022
Sorry, commit above is in no way related to this issue. |
paul-dingemans
added a commit
to paul-dingemans/ktlint
that referenced
this issue
Mar 12, 2022
2 tasks
paul-dingemans
added a commit
that referenced
this issue
Mar 12, 2022
…emoval of required imports (#1402) There is no reliable way to determined whether a wildcard import is actually used in the file. The AST does not seem to contain information about the actuall class that an identifier refers to. It is preferred to not remove unused imports than that needed imports are removed. Revert #1256 Closes #1277 Closes #1393
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given this file:
command:
Ktlint incorrectly says that
import com.example.Outer.*
is unnecessary. If the wildcard is replaced with the explicit import, Ktlint no longer complains.Your Environment
The text was updated successfully, but these errors were encountered: