-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
Description
Wish list of Clippy lints and features & bug fixes we would like to see added/improved/fixed based on the Rust projects we've been developing at Embark.
This is not a complete list, but an attempt to keep a bit of structure for our own sake, and may be of interest for Clippy lint developers as well.
Should have
Lints & Clippy features or fixes that would directly improve or help our workflows
- [Roadmap] Configuration file for lints rust-lang/rust-clippy#6625 (also see Be able to disable/enable Clippy lints globally #22)
- Implicit Inheritance for Workspapce Inheritance rust-lang/cargo#12208
-
#[allow(unsafe_code)]
should be allowed afterSAFETY:
docs rust-lang/rust-clippy#8679 (Embark filed) - Detect redundant always successful
assert_eq!
rust-lang/rust-clippy#8567 (Embark filed) - Lint on large
std::{include_str!, include_bytes!};
calls. rust-lang/rust-clippy#7005 (Embark filed) - On 32-bit, usize as f64 recommends f64::from(usize) rust-lang/rust-clippy#3689 (
cast_lossless
) -
undocumented_unsafe_blocks
does not trigger on unsafe trait impls rust-lang/rust-clippy#8505 - clippy --fix falsely detects dirty Git LFS files rust-lang/rust-clippy#8349
- Flag let _ = ... as dangerous rust-lang/rust-clippy#8246
- New lint (
unnecessary_safety_comment
): reverse ofundocumented_unsafe_blocks
rust-lang/rust-clippy#7954 - Check for invalid target_arch rust-lang/rust-clippy#7828
- New lint: map then unwrap rust-lang/rust-clippy#7763
- not_unsafe_ptr_arg_deref false positives rust-lang/rust-clippy#3045
- not_unsafe_ptr_arg_deref does not trigger on type aliases and trait methods rust-lang/rust-clippy#8092
- use_self still gives false positives rust-lang/rust-clippy#6902
- Lint request: Safety comment on safe code rust-lang/rust-clippy#6880
- Split
missing_docs_in_private_items
into various lints rust-lang/rust-clippy#5736 (by @jhpratt) - lint unused (clippy) allow attributes rust-lang/rust-clippy#3122
-
derive_partial_eq_without_eq
will trigger for third party crate derives rust-lang/rust-clippy#9320 - derive_partial_eq_without_eq should acknowledge the constraint it adds rust-lang/rust-clippy#9063
- Temporarily downgrade
uninlined_format_args
(topedantic
ornursery
) rust-lang/rust-clippy#10087 - trait_duplication_in_bounds breaks code rust-lang/rust-clippy#9961
-
needless_pass_by_ref_mut
: false positive with closures rust-lang/rust-clippy#11620 - Detect unknown features inside
#[cfg(feature = "…")]
blocks rust-lang/rust-clippy#11649
Nice to have
Lints & Clippy features or fixes that would be nice to have, but are lower priority to us than the above list.
- unwrap-used not triggering for DashMap rust-lang/rust-clippy#8399
- Prefer
instant.elapsed()
overInstant::now() - instant
rust-lang/rust-clippy#8603 - New lint: suggest using "implicit named arguments" rust-lang/rust-clippy#8368
- [ER] Useless str -> String allocation rust-lang/rust-clippy#8088
- New lint to minimize the unsafe block scope. rust-lang/rust-clippy#8022
- Add copy lint name function to Clippy's lint list rust-lang/rust-clippy#7959
- Improve filtering options for Clippy's lint list rust-lang/rust-clippy#7958
- Lint against shadowing the prelude rust-lang/rust-clippy#8439
- Improve explanation of not_unsafe_ptr_arg_deref rust-lang/rust-clippy#7714
- Suggest
std::ptr::swap(a, b)
instead ofstd::mem::swap(&mut *a, &mut *b)
rust-lang/rust-clippy#7381 - Explicit unlock for locks rust-lang/rust-clippy#7500
- iter() -> into_iter() rust-lang/rust-clippy#7459
- New lint: suggest the use of Result::unwrap_or_else over Result::map_or_else rust-lang/rust-clippy#7328
- Cargo: check license is valid SPDX license expression rust-lang/rust-clippy#5974
- Lint double negation
!count != 0
rust-lang/rust-clippy#5794 -
unnecessary_lazy_evaluations
does not take cost of expression into account rust-lang/rust-clippy#8522 (by @jhpratt) - Unecessary
mut
reference in parameter rust-lang/rust-clippy#8863
Not filed / found
Fixes or enhancements that believe there is no issue for yet, if you find one please do comment and we'll update it here.
-
cargo clippy --fix
often doesn't work and it is unclear to the user which lints it works for and which it skips - A lint to require types in crate to be used fully qualified, like
log::info!("hej")
instead ofuse log::info; info!("hej")
by specifyinglog
crate inclippy.toml
section for the lint. - A lint to disallow returning
Option<()>
as we've seen that use in code just to (too) easily early out with?
on empty options.
Related tracking issues for other Rust components:
MarijnS95 and vojd