Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Apr 17, 2024

Conversation

snowsignal
Copy link
Member

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
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@MichaReiser
Copy link
Member

MichaReiser commented Apr 17, 2024

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

@snowsignal snowsignal merged commit 0a63274 into main Apr 17, 2024
17 checks passed
@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.

None yet

3 participants