Related: https://github.com/rust-lang/cargo/issues/12495 (about ignoring unknown lints, explicitly passed, when compiling with an older compiler, rather than a new compiler introducing new lints).
If we had something like this, then we could consider using -D for some lint groups or leaving Clippy's default for some lints in clippy::all.
Low priority (we will likely not use them in the end)
[ ] Conditional compilation for clippy.toml?
No concrete use cases from our side yet; and if needed, we could always handle it on our side generating .clippy.toml on the fly (and using CLIPPY_CONF_DIR to find it in the objtree instead of the srctree).
So far, we have check-private-items enabled, but we do not have all the lints covered enabled, and in the future we might want to enable them, thus check-private-items may make it harder to start.
Features that we would like to see
Required (we almost certainly want them)
[ ] Macros wrapping expressions in
unsafe
blocks when usingunsafe_op_in_unsafe_fn
.clippy::macro_metavars_in_unsafe
.[ ] Lint to catch
#[no_mangle]
on non-repr(C)
pub static
s.[ ] Support custom
dbg!
s in thedbg_macro
lint.Nice to have (not critical, we could workaround if needed, etc.)
[ ] Lints that generalize
exit
,todo
,mem_forget
, etc.[ ]
disallowed_names
support for identifiers.[ ] Per-path lint levels for
DisallowedPath
-related lints.[ ] Diagnostic for unexpected paths in configuration file.
disallowed_macros
's paths.[ ] Have a lint against usize-to-u64 casts (or, against all integer casts).
[ ] Make
unnecessary_cast
cover somecore::ffi::c_*
cases.[ ]
unnecessary_cast
does not trigger with a local but it does with a parameter.[ ] Ignoring lints added after a given Rust version.
-D
for some lint groups or leaving Clippy's default for some lints inclippy::all
.[ ] Unsafe attributes support.
[ ] Avoid inherent methods on generic smart pointers.
[ ] Split
needless_lifetimes
.[ ] Support for
--fix
without Cargo (e.g. insideclippy-driver
).cargo
(the binary) would be fine if needed, but not if it requires a Cargo-based structure.[ ]
unsafe extern
support.[ ] Overindented lines lint (similar to
doc_lazy_continuation
).[ ] Unneeded
rust
as language inrustdoc
's documentation examples.Low priority (we will likely not use them in the end)
[ ] Conditional compilation for
clippy.toml
?.clippy.toml
on the fly (and usingCLIPPY_CONF_DIR
to find it in theobjtree
instead of thesrctree
).[ ] Fine-grained
check-private-items
(https://doc.rust-lang.org/clippy/lint_configuration.html#check-private-items).check-private-items
enabled, but we do not have all the lints covered enabled, and in the future we might want to enable them, thuscheck-private-items
may make it harder to start.Done (stabilized, fixed, not needed anymore, etc.)
[x] Support/document running Clippy as a
rustc
wrapper.[x] Configuring lint levels when using
clippy-driver
.[x] Normalize semicolon inside/outside blocks for
()
returning expressions (semicolon_outside_block
andsemicolon_inside_block
, 1.68.0).[x] Lint to warn about missing
// SAFETY:
explanations (undocumented_unsafe_blocks
, 1.58.0).[x] Lint to warn about unexpected
# Safety
contracts (i.e. the reverse of themissing_safety_doc
lint) (unnecessary_safety_doc
, 1.67.0).[x] Lint to warn about unexpected
// SAFETY:
comments (i.e. the reverse of theundocumented_unsafe_blocks
lint) (unnecessary_safety_comment
, 1.67.0).// SAFETY:
comments also for explaining why safe code makes other unsafe code sound, though.[x] Lint to catch
#[no_mangle]
but non-extern "C"
(no_mangle_with_rust_abi
, 1.69.0).Bugs that we would like to see fixed
Required (we almost certainly want them)
[ ]
undocumented_unsafe_blocks
false positives around attributes.[ ]
disallowed_macros
false negatives.dbg_macro
emulation purposes.$t + $t
case): https://github.com/rust-lang/rust-clippy/pull/11439 (1.74).Nice to have (probably not critical, we could workaround if needed, etc.)
Low priority (we will likely not use them in the end)
Done (stabilized, fixed, or not needed anymore, etc.)
[x]
README
: document that Clippy may change codegen.[x]
new_ret_no_self
false positive when returningimpl Trait<Self>
.pin-init
usage.[x]
macro_metavars_in_unsafe
false negative without statement.