(diagnostics: &[ProviderProfileDiagnostic])
| 5534 | } |
| 5535 | |
| 5536 | fn print_profile_diagnostics(diagnostics: &[ProviderProfileDiagnostic]) { |
| 5537 | if diagnostics.is_empty() { |
| 5538 | return; |
| 5539 | } |
| 5540 | eprintln!("{}", "Provider profile diagnostics:".red().bold()); |
| 5541 | for diagnostic in diagnostics { |
| 5542 | let source = if diagnostic.source.is_empty() { |
| 5543 | "<input>" |
| 5544 | } else { |
| 5545 | &diagnostic.source |
| 5546 | }; |
| 5547 | let profile = if diagnostic.profile_id.is_empty() { |
| 5548 | "-".to_string() |
| 5549 | } else { |
| 5550 | diagnostic.profile_id.clone() |
| 5551 | }; |
| 5552 | eprintln!( |
| 5553 | " {} {} profile={} field={} {}", |
| 5554 | diagnostic.severity.as_str().red(), |
| 5555 | source, |
| 5556 | profile, |
| 5557 | diagnostic.field, |
| 5558 | diagnostic.message |
| 5559 | ); |
| 5560 | } |
| 5561 | } |
| 5562 | |
| 5563 | fn profile_diagnostics_have_errors(diagnostics: &[ProviderProfileDiagnostic]) -> bool { |
| 5564 | diagnostics |
no test coverage detected