MCPcopy Create free account
hub / github.com/csskit/csskit / hint_bad_sheet

Function hint_bad_sheet

crates/csskit/src/commands/check.rs:340–356  ·  view source on GitHub ↗
(sheet: &str, input: &[String], config: &GlobalConfig)

Source from the content-addressed store, hash-verified

338}
339
340fn hint_bad_sheet(sheet: &str, input: &[String], config: &GlobalConfig) {
341 if !sheet.ends_with(".css") {
342 return;
343 }
344 let colors = config.colors();
345 let help_label = maybe_color(colors, "help", |s| bold_green(s));
346 let cks = find_cks_hint();
347 let all_css = std::iter::once(sheet).chain(input.iter().map(String::as_str)).collect::<Vec<_>>().join(" ");
348 let cmd = format!("csskit check {cks} {all_css}");
349 eprintln!();
350 eprintln!(
351 "{}: `{}` looks like a CSS file, did you mean `{}`?",
352 help_label,
353 sheet,
354 maybe_color(colors, &cmd, |s| bold_green(s))
355 );
356}

Callers 1

runMethod · 0.85

Calls 5

maybe_colorFunction · 0.85
bold_greenFunction · 0.85
find_cks_hintFunction · 0.85
colorsMethod · 0.80
iterMethod · 0.80

Tested by

no test coverage detected