Skip to content

Commit 37772b8

Browse files
committed
Mention an extra argument required to check tests
Add a note to tests-related lint descriptions that clippy needs to be run with `--tests` argument to actually check tests, which is not quite obvious.
1 parent d5d644f commit 37772b8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

clippy_lints/src/attrs/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,8 @@ declare_clippy_lint! {
453453
/// ### What it does
454454
/// Checks for ignored tests without messages.
455455
///
456+
/// Note: you need to run `cargo clippy --tests` to enable tests checking.
457+
///
456458
/// ### Why is this bad?
457459
/// The reason for ignoring the test may not be obvious.
458460
///

clippy_lints/src/redundant_test_prefix.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ declare_clippy_lint! {
1717
/// Checks for test functions (functions annotated with `#[test]`) that are prefixed
1818
/// with `test_` which is redundant.
1919
///
20+
/// Note: you need to run `cargo clippy --tests` to enable tests checking.
21+
///
2022
/// ### Why is this bad?
2123
/// This is redundant because test functions are already annotated with `#[test]`.
2224
/// Moreover, it clutters the output of `cargo test` since test functions are expanded as

0 commit comments

Comments
 (0)