Skip to content

Modifications to config files that are used through extend in another config file don't trigger ruff-vscode to reload the config #825

@shearer12345

Description

@shearer12345

If we have a Ruff config file (e.g. .ruff.toml) that uses extend to build on another Ruff file (e.g. .ruff-base.toml), and use this in VSCode, changes to the extend files don't trigger VSCode to reload the config. The extending files needs to be save to trigger (or alter ruff settings, or reload VSCode).

My guess is that ruff-vscode doesn't currently watch the extended files.

Example files attached, and demo video showing the bug case as described step by step:

  1. Load the three files in VSCode, show them side-by-side for clarity
  2. Make sure ruff-vscode is configured to use .ruff.toml
  3. observe that nothing is highlighted in some_file.py
  4. uncomment line 6 (about dummy-variable-rgx) in .ruff-base.toml (any change here that would effect the warnings would be fine) and save
  5. observe that nothing has changed in highlighting in some_file.py
  6. do a null-op change to .ruff.toml and save (or just hit save, but that's not very visible on video)
  7. observe that now the highlighting in some_file.py has changed
  8. recomment line 6 in .ruff-base.toml and save
  9. observe highlighting doesn't change
  10. null-op change to .ruff.toml and save
  11. observe highlighting now changes

some_file.py
.ruff.toml.txt
.ruff-base.toml.txt

ruff-vscode-extend-watch-bug.webm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions