You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 18 2023 00:00:00)
Included patches: 1-2048
Operating System
Linux pierre 6.5.7-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 11 04:07:58 UTC 2023 x86_64 GNU/Linux
What went wrong
Please note that in the reproducing the bug section I've included a fix that works
Vim was unable to run ruff on a working python file. When run from the command line, ruff worked just fine. Using the VimInfo command, I noticed the following error in Ale's attempt to use the ruff linter:
finished - exit code 2) ['/usr/bin/zsh', '-c', 'cd ''/home/pierre/python_projects/budget'' &&
''ruff'' --format text --stdin-filename ''/home/pierre/python_projects/budget/src/budget/report
s.py'' - < ''/tmp/vwMb833/1/reports.py''']
<<>>
error: unexpected argument '--format' found
tip: to pass '--format' as a value, use '-- --format'
Usage: ruff check [OPTIONS] [FILES]...
Reproducing the Bug
After some experimentation with the ruff.vim file in your repository installed via vim Plug, I was able to get the error resolved by simply removing the --format option, which according to the ruff --help info, isn't actually available. There is a format subcommand, but treating the option as a subcommand by removing the double dash didn't yield a functioning linter.
Here is the function as installed and causing an error:
As mentioned by @john-kurkowski, this is a duplicate of #4633. However, please note that I've added a workaround to the dicussion that may serve while the function of the --format option is dropped or amended.
Information
VIM version
VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Oct 18 2023 00:00:00)
Included patches: 1-2048
Operating System
Linux pierre 6.5.7-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Oct 11 04:07:58 UTC 2023 x86_64 GNU/Linux
What went wrong
Please note that in the reproducing the bug section I've included a fix that works
Vim was unable to run ruff on a working python file. When run from the command line, ruff worked just fine. Using the VimInfo command, I noticed the following error in Ale's attempt to use the ruff linter:
Reproducing the Bug
After some experimentation with the ruff.vim file in your repository installed via vim Plug, I was able to get the error resolved by simply removing the --format option, which according to the ruff --help info, isn't actually available. There is a format subcommand, but treating the option as a subcommand by removing the double dash didn't yield a functioning linter.
Here is the function as installed and causing an error:
Here is the function amended as described yielding success (note the sole difference is on line 51):
:ALEInfo
Thank you very much for the lovely plugin, and please forgive any errors in reporting the bug. This is my first attempt.
The text was updated successfully, but these errors were encountered: