    // Filter and report JSON diagnostic messages from standard input
    for line in io::stdin().lock().lines() {
        let line = line.with_context(|| "Failed to read line from standard input")?;
        let diagnostic: Diagnostic = serde_json::from_str(&line)
            .with_context(|| format!("Failed to parse JSON from standard input: {:?}", line))?;
        // Ignore diagnostics that don't have a message
        if let Some(message) = diagnostic.message {
            if should_report_message(&message, &file_changes) {
                println!("{}", message.rendered);