mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
Split add_noqa
process into distinctive edit generation and edit application stages (#11265)
## Summary `--add-noqa` now runs in two stages: first, the linter finds all diagnostics that need noqa comments and generate edits on a per-line basis. Second, these edits are applied, in order, to the document. A public-facing function, `generate_noqa_edits`, has also been introduced, which returns noqa edits generated on a per-diagnostic basis. This will be used by `ruff server` for noqa comment quick-fixes. ## Test Plan Unit tests have been updated.
This commit is contained in:
parent
0726e82342
commit
890cc325d5
3 changed files with 320 additions and 74 deletions
|
@ -5,6 +5,7 @@
|
|||
//!
|
||||
//! [Ruff]: https://github.com/astral-sh/ruff
|
||||
|
||||
pub use noqa::generate_noqa_edits;
|
||||
#[cfg(feature = "clap")]
|
||||
pub use registry::clap_completion::RuleParser;
|
||||
#[cfg(feature = "clap")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue