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

Function hint_no_input

crates/csskit/src/commands/check.rs:319–338  ·  view source on GitHub ↗
(sheet: &str, config: &GlobalConfig)

Source from the content-addressed store, hash-verified

317}
318
319fn hint_no_input(sheet: &str, config: &GlobalConfig) {
320 let colors = config.colors();
321 let error_label = maybe_color(colors, "error", |s| bold_red(s));
322 let help_label = maybe_color(colors, "help", |s| bold_green(s));
323 eprintln!("{}: no CSS files to check", error_label);
324 eprintln!();
325 eprintln!("{}: usage: csskit check <rules.cks> <file1.css> [more.css...]", help_label);
326
327 if sheet.ends_with(".css") {
328 let cks = find_cks_hint();
329 let cmd = format!("csskit check {cks} {sheet}");
330 let help_label = maybe_color(colors, "help", |s| bold_green(s));
331 eprintln!(
332 "{}: `{}` looks like a CSS file, did you mean `{}`?",
333 help_label,
334 sheet,
335 maybe_color(colors, &cmd, |s| bold_green(s))
336 );
337 }
338}
339
340fn hint_bad_sheet(sheet: &str, input: &[String], config: &GlobalConfig) {
341 if !sheet.ends_with(".css") {

Callers 1

runMethod · 0.85

Calls 5

maybe_colorFunction · 0.85
bold_redFunction · 0.85
bold_greenFunction · 0.85
find_cks_hintFunction · 0.85
colorsMethod · 0.80

Tested by

no test coverage detected