Skip to content

Commit b2f9191

Browse files
committed
Fix formatting and lint description
1 parent bd2a5b2 commit b2f9191

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

clippy_lints/src/tests_outside_test_module.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ use rustc_span::{def_id::LocalDefId, Span};
66

77
declare_clippy_lint! {
88
/// ### What it does
9-
///
10-
/// Triggers when a testing function (marked with the `#[test]` attribute) isn't inside a testing module (marked with `#[cfg(test)]`).
11-
///
9+
/// Triggers when a testing function (marked with the `#[test]` attribute) isn't inside a testing module
10+
/// (marked with `#[cfg(test)]`).
1211
/// ### Why is this bad?
13-
///
14-
/// The idiomatic (and more performant) way of writing tests is inside a testing module (flagged with `#[cfg(test)]`), having test functions outside of this module is confusing and may lead to them being "hidden".
15-
///
12+
/// The idiomatic (and more performant) way of writing tests is inside a testing module (flagged with `#[cfg(test)]`),
13+
/// having test functions outside of this module is confusing and may lead to them being "hidden".
1614
/// ### Example
1715
/// ```rust
1816
/// #[test]
@@ -39,7 +37,7 @@ declare_clippy_lint! {
3937
#[clippy::version = "1.70.0"]
4038
pub TESTS_OUTSIDE_TEST_MODULE,
4139
restriction,
42-
"The test function `my_cool_test` is outside the testing module `tests`."
40+
"A test function is outside the testing module."
4341
}
4442

4543
declare_lint_pass!(TestsOutsideTestModule => [TESTS_OUTSIDE_TEST_MODULE]);

0 commit comments

Comments
 (0)