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
The behavior between ruff server and ruff-lsp is different when a source action is applied in a file with syntax errors.
ruff server returns an error stating "A parsing error occurred during fix_all: ..." and does not apply any fixes.
ruff-lsp does not return any error and applies whatever fixes are available.
Use the following code snippet to test this out with source.fixAll code action:
foo;
y=
ruff-lsp will remove the semicolon after foo while ruff server will give an error.
For context, even if the source code contains syntax errors, Ruff can produce diagnostics for token-based rules and can generate fixes for some of them.
I'm not sure if we want to change this behavior but I don't think the new server should return an error if there's a syntax error. The diagnostics already point out the syntax error so this seems like a noise.
The text was updated successfully, but these errors were encountered:
The behavior between
ruff server
andruff-lsp
is different when a source action is applied in a file with syntax errors.ruff server
returns an error stating "A parsing error occurred duringfix_all
: ..." and does not apply any fixes.ruff-lsp
does not return any error and applies whatever fixes are available.Use the following code snippet to test this out with
source.fixAll
code action:ruff-lsp
will remove the semicolon afterfoo
whileruff server
will give an error.For context, even if the source code contains syntax errors, Ruff can produce diagnostics for token-based rules and can generate fixes for some of them.
I'm not sure if we want to change this behavior but I don't think the new server should return an error if there's a syntax error. The diagnostics already point out the syntax error so this seems like a noise.
The text was updated successfully, but these errors were encountered: