Repository navigation
Update canonical lints - #160
Conversation
Explicitly allow `clippy.cast_possible_truncation`, because that one just keeps annoying us, and I don't think it has caught a single mistake. Remove `warn(unused_crate_dependencies)`; this is now handled by default at the cargo level. Add some minor cargo lints, which already match our best practices.
DJMcNab
left a comment
There was a problem hiding this comment.
Sure, seems reasonable to me.
It isn't clear to me what the #[expect] equivalent is for the Cargo lints - do we end up needing to disable them for the whole repo?
Not sure what you're asking? If the question is "How do we opt out in a child crate", we can always override the workspace value there. |
This is based on the lint set in linebender/linebender.github.io#160 The 1.100 MSRV will be useful for adding the Never type in follow-up PRs.
Oh, I didn't realise this was possible. I thought |
|
Oh crap, you're right, it is. See also: rust-lang/cargo#13157 |
|
In our specific case, that's fine, because I don't expect use to override these lints very often at all, but still annoying. |
Explicitly allow
clippy.cast_possible_truncation, because that one just keeps annoying us, and I don't think it has caught a single mistake.Remove
warn(unused_crate_dependencies); this is now handled by default with better heuristics bycargo.unused_dependencies.Add some minor cargo lints, which already match our best practices.