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

Detect when paths in src/utils/path.rs become outdated #6274

Closed
Aaron1011 opened this issue Oct 31, 2020 · 1 comment
Closed

Detect when paths in src/utils/path.rs become outdated #6274

Aaron1011 opened this issue Oct 31, 2020 · 1 comment
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@Aaron1011
Copy link
Member

Clippy lists a lot of different paths in https://github.com/rust-lang/rust-clippy/blob/084b203988e04bcf89d3b2d6bbc77b65ecfab553/clippy_lints/src/utils/paths.rs, which are represented as strings. If one of these becomes invalid due to a compiler refactoring, Clippy will continue to compile - however, the behavior of lints may change, since the path will never match anything.

It would be useful to validate that all of the paths are valid (if the crate at the beginning of the path is loaded). I'm not sure how difficult this would be - I think we would need access to the resolver before we run any lints.

I came across this in rust-lang/rust#75534 - I moved the rustc Lint type, which caused an internal clippy lint to stop firing.

@Aaron1011 Aaron1011 added the C-bug Category: Clippy is not doing the correct thing label Oct 31, 2020
@ebroto
Copy link
Member

ebroto commented Oct 31, 2020

Duplicate of #6047

FYI #6244 partially addressed this, but the dogfood tests don't run in the rustc repo (I guess because it takes some time), so we need to find a way to check those paths, ideally without duplication.

@ebroto ebroto closed this as completed Oct 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

2 participants