-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing ruff executable breaks other linters #69
Comments
chris-reeves
added a commit
to chris-reeves/python-lsp-ruff
that referenced
this issue
Dec 22, 2023
chris-reeves
added a commit
to chris-reeves/python-lsp-ruff
that referenced
this issue
Dec 22, 2023
chris-reeves
added a commit
to chris-reeves/python-lsp-ruff
that referenced
this issue
Dec 22, 2023
chris-reeves
added a commit
to chris-reeves/python-lsp-ruff
that referenced
this issue
Dec 22, 2023
jhossbach
pushed a commit
that referenced
this issue
Dec 26, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If the
executable
configuration param is specified but points to an executable that does not exist thenrun_ruff()
throws an exception and prevents otherpython-lsp-server
linters from running. With a valid executable specified multiple lint errors are flagged from multiple linters (including ruff). With an invalid executable specified no lint errors are flagged (not even from other linters).For example:
Versions:
Prior to commit
ea5f874a
,python-lsp-ruff
would silently (apart from a debug message) fall back to runningruff
via the python module if the specified executable was not found. Now an error message is logged following thePopen()
failure, but the code still attempts to use the pipe (which is not defined following the exception). That throws an exception which is not caught and as a result any subsequent linters aren't run (so not only do we not seI see two options for resolving this (other than making sure the
executable
config param is set correctly :-p):ruff
via the python module (similar to previous behaviour, but with the option to not even attempt to run the executable if it's not specified).I'd suggest the second option as that will provide a better user experience. That assumes commit
ea5f874a
was simply intended to shortcut the attempt to call the executable if it was not set, rather than intended to remove the fallback behaviour.This issue was discovered while investigating yaegassy/coc-pylsp#24.
The text was updated successfully, but these errors were encountered: