ruff: EXE001 and EXE002 do not run on WSL
Background: I have just set up ruff for the first time, and loved it, so fast and so complete! I fixed all the errors, added the github action to my pipeline, pushed the commit and … boom, pipeline fail due to EXE002 😭
The opening sentence of Microsoft’s documentation on Working across file systems is:
We recommend against working across operating systems with your files, unless you have a specific reason for doing so.
Executing checks for EXE001 and EXE002 should therefore be possible on WSL in most situations. These have been specifically disabled with #5735
Suggestion:
Add a configuration option lint.ignore-exe-wsl; ideally defaulting to false to allow users to configure this for their situation
I would be happy to support a PR with documentation and/or testing but have zero rust experience and the code-base is huge (I’d need too many pointers on how to add the config option)
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 17 (7 by maintainers)
If you want support with testing or documentation, please let me know (@ tag my new username and I’ll get a notification).
I’ve started taking a look at this … as a thank-you for getting me interested in rust.
Hope to have a draft PR for review soon.
For now: @vollossy - if you’re running in a dev-container then the issue doesn’t occur as the container is not detected as WSL (and you surely wouldn’t be mad enough to bind-mount a NTFS partition into a dev container and suffer the performance hit 😉 )
I would go with the temp file for simplicity. I expect the performance overhead for creating the tempfile to be marginal when linting many files where ruff needs to read and test every file’s permission.