Skip to content

ruff server refreshes diagnostics for open files when file configuration is changed#10988

Merged
snowsignal merged 3 commits into
mainfrom
jane/server/diagnostics/refresh
Apr 17, 2024
Merged

ruff server refreshes diagnostics for open files when file configuration is changed#10988
snowsignal merged 3 commits into
mainfrom
jane/server/diagnostics/refresh

Conversation

@snowsignal

Copy link
Copy Markdown
Contributor

Summary

The server now requests a workspace diagnostic refresh when a configuration file gets changed. This means that diagnostics for all open files will be automatically re-requested by the client on a config change.

Test Plan

You can test this by opening several files in VS Code, setting select in your file configuration to [], and observing that the diagnostics go away once the file is saved (besides any Pylance diagnostics). Restore it to what it was before, and you should see the diagnostics automatically return once a save happens.

@snowsignal snowsignal added the server Related to the LSP server label Apr 17, 2024
@snowsignal snowsignal added this to the Ruff Server: Beta milestone Apr 17, 2024
@github-actions

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser

MichaReiser commented Apr 17, 2024

Copy link
Copy Markdown
Member

It would be nice to have integration tests for this :P

@snowsignal snowsignal merged commit 0a63274 into main Apr 17, 2024
@snowsignal snowsignal deleted the jane/server/diagnostics/refresh branch April 17, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

server Related to the LSP server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants