Skip to content

Commit 62b8ef3

Browse files
committed
Mention that missing_assert_message lint ignores test functions
1 parent 4494b69 commit 62b8ef3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clippy_lints/src/missing_assert_message.rs

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ declare_clippy_lint! {
1515
/// A good custom message should be more about why the failure of the assertion is problematic
1616
/// and not what is failed because the assertion already conveys that.
1717
///
18+
/// Although the same reasoning applies to testing functions, this lint ignores them as they would be too noisy.
19+
/// Also, in most cases understanding the test failure would be easier
20+
/// compared to understanding a complex invariant distributed around the codebase.
21+
///
1822
/// ### Known problems
1923
/// This lint cannot check the quality of the custom panic messages.
2024
/// Hence, you can suppress this lint simply by adding placeholder messages

0 commit comments

Comments
 (0)