koxudaxi / ruff-pycharm-plugin

PyCharm plugin for ruff. This plugin provides reformat code using ruff.
MIT License
184 stars 7 forks source link

Bad path forming for ruff config file on WSL #358

Closed FieryDruid closed 3 months ago

FieryDruid commented 6 months ago

Describe the bug

My project is located in a directory inside WSL. Ruff is installed there as well. When I specify the path to ruff.toml through pycharm, a relative path from wsl is inserted in the “Ruff config file” field, which leads to an error when forming a full path to the config file.

The solution to the problem is manual editing of ruff.xml in .idea/. If only “ruff.toml” is left in the path, the path to it will be formed correctly.

To Reproduce Steps to reproduce the behavior:

  1. Create project in wsl directory
  2. install ruff on wsl
  3. create config file in root project directory
  4. Open this directory in PyCharm from Windows

Expected behavior A correct parsing of the path to the config file or the ability to specify a relative path

Screenshots

Ruff executable and ruff config file settings: image

Error: image

Environments (please complete the following information):

koxudaxi commented 4 months ago

OK, I will fix it.