astral-sh / ruff-vscode

A Visual Studio Code extension with support for the Ruff linter.
Other
946 stars 45 forks source link

Organize imports does not respect a line-length override #435

Closed strattao closed 3 months ago

strattao commented 3 months ago

I have this override in my vscode.settings file: { "ruff.format.args": ["--config", "line-length=99"], }

The line length override appears to be respected except when sorting the imports. What am I missing?

MichaReiser commented 3 months ago

Hy @strattao

import sorting is implemented as a lint rule today. That's why you have to also set ruff.lint.args": ["--config", "line-length=99"]. I agree, having to specify the line length twice is a bit awkward. CC: @snowsignal who's designing our new LSP and is thinking about what settings to expose

strattao commented 3 months ago

Got it, that works. Thanks and sorry for the hassle!