Skip to content

Lint to warn about importing a package you do not directly depend on #58254

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

Closed
dnfield opened this issue Oct 27, 2020 · 2 comments
Closed

Lint to warn about importing a package you do not directly depend on #58254

dnfield opened this issue Oct 27, 2020 · 2 comments
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-lint-request type-enhancement A request for a change that isn't a bug

Comments

@dnfield
Copy link
Contributor

dnfield commented Oct 27, 2020

Package a.yaml:

dependencies:
  b: any

package b.yaml:

dependencies:
  c: any

pacakge a.dart:

import 'package:c/c.dart'; // should get linted

void main() {}

It'd be nice if a lint could catch that package a is transitively depending on c and importing it - and insteaed should be directly depending on it.

@dnfield dnfield added type-enhancement A request for a change that isn't a bug linter-lint-request labels Oct 27, 2020
@pq
Copy link
Member

pq commented Oct 27, 2020

Thanks Dan! As it happens I'm hoping to make some time for this in the next few weeks. Tracked in #57175.

Feel free to chime in there (or re-open this if you think I closed it mistakenly).

@pq pq closed this as completed Oct 27, 2020
@dnfield
Copy link
Contributor Author

dnfield commented Oct 27, 2020

I agree this is a duplicate. Thanks!

@devoncarew devoncarew added devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. labels Nov 18, 2024
@devoncarew devoncarew transferred this issue from dart-archive/linter Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devexp-linter Issues with the analyzer's support for the linter package legacy-area-analyzer Use area-devexp instead. linter-lint-request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

3 participants