Skip to content

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

Open
OmegaJak wants to merge 2 commits into
fnando:mainfrom
OmegaJak:fix-clippy
Open

Correctly filter clippy results to include the current file only#38
OmegaJak wants to merge 2 commits into
fnando:mainfrom
OmegaJak:fix-clippy

Conversation

@OmegaJak
Copy link
Copy Markdown

@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