Skip to content

Unused imports does not detect unused import as part of a repeated alias #38784

Closed
@dballesteros7

Description

@dballesteros7

Suppose you have:

import 'package:foo' as foo;
import 'package:foo_extension' as foo;

And later down the road someone removes all uses of the symbols imported from foo_extension from the library.

The analyzer will not report the foo_extension import as unused as long as foo itself is used even if it's just for the symbols in package:foo.

I'd expect that the check goes one level deeper with aliased imports and verifies that indeed something from the import is being used through the alias.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions