Skip to content

Failure to parse ruff.toml results in default configuration #711

Open
@lpulley

Description

@lpulley

When ruff.toml changes (e.g. git checkout) and the new contents are unparseable by the running Ruff server (e.g. addition of builtins-strict-checking with an already-running pre-0.9.6 Ruff server), the Ruff extension apparently just falls back to the default configuration and will still apply formatting changes, fixes, etc. disregarding ruff.toml. For us, this resulted in files being auto-formatted on save in ways that disagree with ruff.toml.

It seems to me that if ruff.toml fails to parse with the running Ruff server, the extension should at least try restarting it (in case the Ruff version launched by the ruff.path executable has been changed to cooperate with the changes to ruff.toml), and at the very least, it shouldn't go ahead with the default configuration. In other words, if there is a failure to parse ruff.toml, I never want the Ruff extension to ignore it and just try using the default configuration; I would want it to stop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions