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 4 months ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

If you want support with testing or documentation, please let me know (@ tag my new username and I’ll get a notification).

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.