use colored::Colorize;
use crate::structural::StructuralAnalysis;
pub(crate) fn print_structural_section(structural: &StructuralAnalysis) {
let warnings: Vec<_> = structural
.warnings
.iter()
.filter(|w| !w.suppressed)
.collect();
if warnings.is_empty() {
return;
}
println!();
println!("{}", "═══ Structural Checks ═══".bold());
warnings.iter().for_each(|w| {
let (code, detail) = (w.kind.code(), w.kind.detail());
println!(
" {} {code} {} ({}:{}) — {}",
"\u{26a0}".yellow(),
w.name,
w.file,
w.line,
detail,
);
});
}