pub(crate) fn check_ignore_directive_usage(&mut self) -> Vec<LintDiagnostic> {
    let mut filtered = Vec::new();

    for diagnostic in self.diagnostics.iter().cloned() {
      if let Some(f) = self.file_ignore_directive.as_mut() {
        if f.check_used(&diagnostic.code) {
          continue;
        }
      }

      let diagnostic_line = diagnostic.range.start.line;
      if let Some(l) =
        self.line_ignore_directives.get_mut(&(diagnostic_line - 1))
      {
        if l.check_used(&diagnostic.code) {
          continue;
        }
      }

      filtered.push(diagnostic);
    }

    filtered
  }
/// Mark ignore directives as used if that directive actually suppresses some
/// diagnostic, and return a list of diagnostics that are not ignored.
/// Make sure that this method is called after all lint rules have been
/// executed.
Mark ignore directives as used if that directive actually suppresses some
diagnostic, and return a list of diagnostics that are not ignored.
Make sure that this method is called after all lint rules have been
executed.
Mark ignore directives as used if that directive actually suppresses some diagnostic and return a list of diagnostics that are not ignored . Make sure that this method is called after all lint rules have been executed .
pub(crate) fn check_ignore_directive_usage(&mut self) -> Vec<LintDiagnostic> {
    let mut filtered = Vec::new();
    for diagnostic in self.diagnostics.iter().cloned() {
      if let Some(f) = self.file_ignore_directive.as_mut() {
        if f.check_used(&diagnostic.code) {
          continue;
        }
      }
      let diagnostic_line = diagnostic.range.start.line;
      if let Some(l) =
        self.line_ignore_directives.get_mut(&(diagnostic_line - 1))
      {
        if l.check_used(&diagnostic.code) {
          continue;
        }
      }
      filtered.push(diagnostic);
    }
    filtered
  }
pub ( crate ) fn check_ignore_directive_usage ( & mut self ) -> Vec < LintDiagnostic > { let mut filtered = Vec :: new ( ) ; for diagnostic in self . diagnostics . iter ( ) . cloned ( ) { if let Some ( f ) = self . file_ignore_directive . as_mut ( ) { if f . check_used ( & diagnostic . code ) { continue ; } } let diagnostic_line = diagnostic . range . start . line ; if let Some ( l ) = self . line_ignore_directives . get_mut ( & ( diagnostic_line - 1 ) ) { if l . check_used ( & diagnostic . code ) { continue ; } } filtered . push ( diagnostic ) ; } filtered }
Mark ignore directives as used if that directive actually suppresses some
diagnostic, and return a list of diagnostics that are not ignored.
Mark ignore directives as used if that directive actually suppresses some diagnostic and return a list of diagnostics that are not ignored .
&mut self