Skip to content

Commit

Permalink
Add rustdoc for generate_noqa_edits
Browse files Browse the repository at this point in the history
  • Loading branch information
snowsignal committed May 9, 2024
1 parent e120658 commit 34f3f29
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/ruff_linter/src/noqa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ use crate::fs::relativize_path;
use crate::registry::{AsRule, Rule, RuleSet};
use crate::rule_redirects::get_redirect_target;

/// Generates an array of edits that matches the length of `diagnostics`.
/// Each potential edit in the array is paired, in order, with the associated diagnostic.
/// Each edit will add a `noqa` comment to the appropriate line in the source to hide
/// the diagnostic. These edits may conflict with each other and should not be applied
/// simultaneously.
pub fn generate_noqa_edits(
path: &Path,
diagnostics: &[Diagnostic],
Expand Down

0 comments on commit 34f3f29

Please sign in to comment.