Skip to main content

suppress_all_diagnostics

Function suppress_all_diagnostics 

Source
pub fn suppress_all_diagnostics(
    db: &mut dyn Db,
    diagnostics: Vec<Diagnostic>,
    cancellation_token: &CancellationToken,
) -> Result<FixAllResults, Canceled>
Expand description

Adds suppressions to all lint diagnostics and writes the changed files back to disk.

Returns how many diagnostics were suppressed along the remaining, non-suppressed diagnostics.

§Panics

If the db’s system isn’t writable.