Skip to content

Commit b6fdcae

Browse files
committed
chore: Migrate print-ban from test to clippy
This should be more resilient to false positives like in #12245 where a string contains `println`.
1 parent e07efd8 commit b6fdcae

File tree

3 files changed

+3
-107
lines changed

3 files changed

+3
-107
lines changed

Diff for: clippy.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
allow-print-in-tests = true
12
disallowed-methods = [
23
{ path = "std::env::var", reason = "Use `Config::get_env` instead. See rust-lang/cargo#11588" },
34
{ path = "std::env::var_os", reason = "Use `Config::get_env_os` instead. See rust-lang/cargo#11588" },

Diff for: src/cargo/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#![allow(clippy::all)]
77
#![warn(clippy::disallowed_methods)]
88
#![warn(clippy::self_named_module_files)]
9+
#![warn(clippy::print_stdout)]
10+
#![warn(clippy::print_stderr)]
911
#![allow(rustdoc::private_intra_doc_links)]
1012

1113
//! # Cargo as a library

Diff for: tests/internal.rs

-107
This file was deleted.

0 commit comments

Comments
 (0)