You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I often find I want to silence some clippy warning (for example, clippy has just warned me about assert!(!(d<d)), which is reasonable, except it's in a test and I really do want to check it).
While it might add more noise, I wonder if the 'help' line could be extended to say how to silence the warning, for example (I've added to the end)
warning: equal expressions as operands to `<`
--> src/datastructures/digraph.rs:174:18
|
174 | assert!(!(d < d));
| ^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op ,
or silence this warning by adding #[allow(clippy::eq_op)] to the function
Allowing Clippy lints works just like allowing rustc lints, with #[allow(clippy::lint_name)]. This is explicitly explained in the readme of Clippy. I don't really see how adding this to every warning would improve the situation. IMO, it would only clump up the message.
After rethinking, I agree about not putting it into the lint message, but maybe the linked website -- or the website could have at least have an obvious link to the manual (is the current manual just the github readme?)
I often find I want to silence some clippy warning (for example, clippy has just warned me about
assert!(!(d<d))
, which is reasonable, except it's in a test and I really do want to check it).While it might add more noise, I wonder if the 'help' line could be extended to say how to silence the warning, for example (I've added to the end)
Or, this information could be added to https://rust-lang.github.io/rust-clippy/master/index.html#eq_op .
At the moment, (because I have a bad memory and don't do it often), every time I want to silence a clippy warning I have to google for it.
The text was updated successfully, but these errors were encountered: