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

Method warn_if_active

src/cli/experimental.rs:89–109  ·  view source on GitHub ↗

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

(&self)

Source from the content-addressed store, hash-verified

87
88 /// If any experimental flags are active, prints a warning to stderr.
89 pub fn warn_if_active(&self) {
90 let flags = self.active_flags();
91 if flags.is_empty() {
92 return;
93 }
94
95 let flag_list = flags
96 .iter()
97 .map(|f| style(*f).bold().to_string())
98 .collect::<Vec<_>>()
99 .join(", ");
100
101 eprintln!(
102 "\n {} Experimental flags enabled: {}\n \
103 These may change or be removed without notice.\n \
104 Share feedback at {}.\n",
105 style(Icon::Warning.to_string()).yellow(),
106 flag_list,
107 style("https://github.com/CodSpeedHQ/codspeed/issues").underlined(),
108 );
109 }
110
111 /// Warns about deprecated flags that graduated to stable options. They are still
112 /// accepted, but will be removed in a future release.

Callers 1

runFunction · 0.80

Calls 2

active_flagsMethod · 0.80
is_emptyMethod · 0.45

Tested by

no test coverage detected