denoland/deno · error

Failed to format {failed_files_count} of {checked_files_str}

Error message

Failed to format {failed_files_count} of {checked_files_str}

What it means

Error "Failed to format {failed_files_count} of {checked_files_str}" thrown in denoland/deno.

Source

Thrown at cli/tools/fmt.rs:1174

    );

    let failed_files_count = self.failed_files_count.load(Ordering::Relaxed);
    let checked_files_count = self.checked_files_count.load(Ordering::Relaxed);

    if failed_files_count == 0 {
      info!(
        "Checked {} {}",
        checked_files_count,
        files_str(checked_files_count)
      );
      Ok(())
    } else {
      let checked_files_str = format!(
        "{} checked {}",
        checked_files_count,
        files_str(checked_files_count)
      );
      Err(anyhow!(
        "Failed to format {failed_files_count} of {checked_files_str}",
      ))
    }
  }
}

/// When storing any formatted text in the incremental cache, we want
/// to ensure that anything stored when formatted will have itself as
/// the output as well. This is to prevent "double format" issues where
/// a user formats their code locally and it fails on the CI afterwards.
fn format_ensure_stable(
  file_path: &Path,
  file: &FileContents,
  fmt_func: impl Fn(&Path, &FileContents) -> Result<Option<String>, AnyError>,
) -> Result<Option<String>, AnyError> {
  let formatted_text = fmt_func(file_path, file)?;

  match formatted_text {

View on GitHub (pinned to 89f33cbef2)

When it happens

Trigger: Thrown at cli/tools/fmt.rs:1174 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of denoland/deno@89f33cbef2 (2026-08-16). Data as JSON: /api/errors/7332330eef625a30. Report an issue: GitHub.