astral-sh / ruff-lsp

A Language Server Protocol implementation for Ruff.
Other
1.31k stars 46 forks source link

Why can't ruff-lsp check for E30* errors even if I add the --preview parameter? #413

Closed a1401358759 closed 7 months ago

a1401358759 commented 7 months ago

Why can't ruff-lsp check for E30* errors even if I add the --preview parameter? image

MichaReiser commented 7 months ago

I think the problem is that Ruff, by default, only enables the E4, E7, E9, and F rules. That means you need to change your configuration to also enable E3 in addition to enabling preview mode:

args = {
    "--preview",
    "--ingore=E402,E501",
    "--line-length=120",
    "--extend-select=E3"
}
a1401358759 commented 7 months ago

@MichaReiser Thank you very much for your answer, it works!