MCPcopy Create free account
hub / github.com/CodSpeedHQ/codspeed / warn_if_active

Method warn_if_active

src/cli/experimental.rs:44–64  ·  view source on GitHub ↗

If any experimental flags are active, prints a warning to stderr.

(&self)

Source from the content-addressed store, hash-verified

42
43 /// If any experimental flags are active, prints a warning to stderr.
44 pub fn warn_if_active(&self) {
45 let flags = self.active_flags();
46 if flags.is_empty() {
47 return;
48 }
49
50 let flag_list = flags
51 .iter()
52 .map(|f| style(*f).bold().to_string())
53 .collect::<Vec<_>>()
54 .join(", ");
55
56 eprintln!(
57 "\n {} Experimental flags enabled: {}\n \
58 These may change or be removed without notice.\n \
59 Share feedback at {}.\n",
60 style(Icon::Warning.to_string()).yellow(),
61 flag_list,
62 style("https://github.com/CodSpeedHQ/codspeed/issues").underlined(),
63 );
64 }
65}

Callers 1

runFunction · 0.80

Calls 2

active_flagsMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected