From 62b8ef304adf92e2f5d3d8f172fa1e4661183692 Mon Sep 17 00:00:00 2001 From: unexge Date: Wed, 27 Sep 2023 22:06:01 +0100 Subject: [PATCH] Mention that `missing_assert_message` lint ignores test functions --- clippy_lints/src/missing_assert_message.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clippy_lints/src/missing_assert_message.rs b/clippy_lints/src/missing_assert_message.rs index c17f00c42751..136947a2c8cd 100644 --- a/clippy_lints/src/missing_assert_message.rs +++ b/clippy_lints/src/missing_assert_message.rs @@ -15,6 +15,10 @@ declare_clippy_lint! { /// A good custom message should be more about why the failure of the assertion is problematic /// and not what is failed because the assertion already conveys that. /// + /// Although the same reasoning applies to testing functions, this lint ignores them as they would be too noisy. + /// Also, in most cases understanding the test failure would be easier + /// compared to understanding a complex invariant distributed around the codebase. + /// /// ### Known problems /// This lint cannot check the quality of the custom panic messages. /// Hence, you can suppress this lint simply by adding placeholder messages