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

Correctly filter clippy results to include the current file only #38

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OmegaJak
Copy link

@OmegaJak OmegaJak commented Nov 2, 2023

Fixes #37.

Made a rust project in samples that can be opened as root for testing, not sure if that's how you like to do things but it helped me.

The clippy target.src_path that was being looked at always reported the main file of the project, not the current file. To filter to the current file, you have to look at the spans being returned.

Tested on Windows (where I had to do the silly \ to / conversion).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clippy lints fail because "offense is for another file" on Windows
1 participant