Skip to content

Commit 9df5e79

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 ccd2540 commit 9df5e79

File tree

3 files changed

+5
-107
lines changed

3 files changed

+5
-107
lines changed

Diff for: clippy.toml

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

Diff for: src/cargo/lib.rs

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
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)]
11+
#![warn(clippy::dbg_macro)]
912
#![allow(rustdoc::private_intra_doc_links)]
1013

1114
//! # Cargo as a library

Diff for: tests/internal.rs

-107
This file was deleted.

0 commit comments

Comments
 (0)