Skip to content
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

shadow lint should use visitor or ExprUseVisitor #318

Closed
Manishearth opened this issue Sep 8, 2015 · 2 comments · Fixed by #7338
Closed

shadow lint should use visitor or ExprUseVisitor #318

Manishearth opened this issue Sep 8, 2015 · 2 comments · Fixed by #7338
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages E-medium Call for participation: Medium difficulty level problem and requires some initial experience.

Comments

@Manishearth
Copy link
Member

We're duplicating a lot of the work Visitor does.

ExprUseVisitor might work, but there's no way of handling scopes.

cc @birkenfeld thoughts?

@llogiq
Copy link
Contributor

llogiq commented Sep 8, 2015

The ExprUseVisitor could at least work for the contains-check (though maybe it's even overkill for that).

@llogiq
Copy link
Contributor

llogiq commented Nov 10, 2015

#449 at least uses the Visitor for the contains check.

@oli-obk oli-obk added E-medium Call for participation: Medium difficulty level problem and requires some initial experience. C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages labels May 10, 2017
bors added a commit that referenced this issue Sep 30, 2021
Re-write shadow lints

changelog: Move shadow_unrelated to restriction
changelog: The shadow lints find a lot more shadows and are not limited to certain patterns

Drastically simplifies the implementation. Catches a lot more cases.

I removed the "initialization happens here" note. It is not helpful IMO.

Closes #318
Fixes #2890
Fixes #6563
Fixes #7588
Fixes #7620
@bors bors closed this as completed in f8303ad Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Enhancement of lints, like adding more cases or adding help messages E-medium Call for participation: Medium difficulty level problem and requires some initial experience.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants