MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / print_profile_diagnostics

Function print_profile_diagnostics

crates/openshell-cli/src/run.rs:5536–5561  ·  view source on GitHub ↗
(diagnostics: &[ProviderProfileDiagnostic])

Source from the content-addressed store, hash-verified

5534}
5535
5536fn 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
5563fn profile_diagnostics_have_errors(diagnostics: &[ProviderProfileDiagnostic]) -> bool {
5564 diagnostics

Callers 3

provider_profile_importFunction · 0.85
provider_profile_updateFunction · 0.85
provider_profile_lintFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected