Skip to content

Commit 7a0b24b

Browse files
committed
Auto merge of #12246 - epage:lint, r=weihanglo
chore: Migrate print-ban from test to clippy This should be more resilient to false positives like in #12245 where a string contains `println`. See also #12224
2 parents 173b88b + 9df5e79 commit 7a0b24b

File tree

4 files changed

+7
-107
lines changed

4 files changed

+7
-107
lines changed

Diff for: .github/workflows/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ jobs:
218218
name: bors build finished
219219
needs:
220220
- build_std
221+
- clippy
221222
- docs
222223
- lockfile
223224
- resolver
@@ -234,6 +235,7 @@ jobs:
234235
name: bors build finished
235236
needs:
236237
- build_std
238+
- clippy
237239
- docs
238240
- lockfile
239241
- resolver

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)