diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-05-08 22:45:06 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-08 22:45:06 -0400 |
commit | 47f7bed677a6b72e873712de8f3988ea891710e4 (patch) | |
tree | 096549459b479cf1383e65c87b77e9f9482df258 /cli/args/mod.rs | |
parent | e6dc4dfbff25e77d2127591802229b4a74037d24 (diff) |
chore: enable clippy::print_stdout and clippy::print_stderr (#23732)
1. Generally we should prefer to use the `log` crate.
2. I very often accidentally commit `eprintln`s.
When we should use `println` or `eprintln`, it's not too bad to be a bit
more verbose and ignore the lint rule.
Diffstat (limited to 'cli/args/mod.rs')
-rw-r--r-- | cli/args/mod.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/args/mod.rs b/cli/args/mod.rs index 3b5d79ef3..bca7cc0f6 100644 --- a/cli/args/mod.rs +++ b/cli/args/mod.rs @@ -747,9 +747,12 @@ impl CliOptions { format!("for: {}", insecure_allowlist.join(", ")) }; let msg = - format!("DANGER: TLS certificate validation is disabled {domains}"); - // use eprintln instead of log::warn so this always gets shown - eprintln!("{}", colors::yellow(msg)); + format!("DANGER: TLS certificate validation is disabled {}", domains); + #[allow(clippy::print_stderr)] + { + // use eprintln instead of log::warn so this always gets shown + eprintln!("{}", colors::yellow(msg)); + } } let maybe_lockfile = maybe_lockfile.filter(|_| !force_global_cache); |