## Summary Fixes https://github.com/astral-sh/ruff/issues/10594. Code actions to disable a diagnostic via `noqa` comment are now available. https://github.com/astral-sh/ruff/assets/19577865/6d3bcf11-a9d9-499b-8c7f-a10cd39cfbba `DiagnosticFix` has been changed so that `noqa` code actions appear even for diagnostics with no available quick fix. It can contain quick fix edits, `noqa` comment edits, or both. ## Test Plan The scenarios that need to be tested are as follows: * A code action to disable a diagnostic should be available for every diagnostic. * Using this code action should append to the appropriate line with the diagnostic, or modify an existing `noqa` comment. * Adding a `noqa` comment manually should make a diagnostic disappear * `Fix all auto-fixable problems` should not add `noqa` comments * Removing a code from a `noqa` comment should make the diagnostic re-appear |
||
|---|---|---|
| .. | ||
| docs/setup | ||
| resources/test/fixtures | ||
| src | ||
| tests | ||
| CONTRIBUTING.md | ||
| Cargo.toml | ||
| README.md | ||
README.md
The Ruff Language Server
Welcome! ruff server is a language server that powers editor integrations with Ruff. The job of the language server is to
listen for requests from the client, (in this case, the code editor of your choice) and call into Ruff's linter and formatter
crates to create real-time diagnostics or formatted code, which is then sent back to the client. It also tracks configuration
files in your editor's workspace, and will refresh its in-memory configuration whenever those files are modified.
Setup
We have specific setup instructions depending on your editor. If you don't see your editor on this list and would like a setup guide, please open an issue.
- Visual Studio Code: Install the Ruff extension from the VS Code Marketplace. The language server used by the extension will be, by default, the one in your actively-installed
ruffbinary. If you don't haveruffinstalled and haven't provided a path to the extension, it comes with a bundledruffversion that it will use instead. Since the new Ruff language server has not yet been stabilized, you will need to use the pre-release version of the extension and enable theExperimental Serversetting. - Neovim: See the Neovim setup guide.
Contributing
If you're interested in contributing to ruff server - well, first of all, thank you! Second of all, you might find the contribution guide to be a useful resource. Finally, don't hesitate to reach out on our Discord if you have questions.