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
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.
I am working on enabling some of these. I will exclude unnecessary_safety_comment for now because it has a false positive in macros rust-lang/rust-clippy#10084
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
.unsafe
blocks when usingunsafe_op_in_unsafe_fn
rust-lang/rust-clippy#7323.macros_hiding_unsafe_code
rust-lang/rust-clippy#7469.clippy::macro_metavars_in_unsafe
.Lint to catch
#[no_mangle]
on non-repr(C)
pub static
s.#[no_mangle]
for non-repr(C)
pub static
s rust-lang/rust-clippy#11219.no_mangle_with_rust_abi
]: Check for statics with a non#[repr(Rust)]
type rust-lang/rust-clippy#11253.#[repr(Rust)]
rust-lang/rust#114201 (1.74).Support custom
dbg!
s in thedbg_macro
lint.dbg!
macros fordbg_macro
lint rust-lang/rust-clippy#11303.Nice to have (not critical, we could workaround if needed, etc.)
Improved shadowing lints.
shadow_*
lints. In particular,shadow_reuse
would lint on many things that are OK for us, especially "top-level"let ... =
s. Please see the details in Lint dangerous uses of shadowing rust-lang/rust-clippy#3433 (comment).Lints that generalize
exit
,todo
,mem_forget
, etc.exit
,todo
,mem_forget
, etc. rust-lang/rust-clippy#8031.disallowed_names
support for identifiers.disallowed_names
for identifiers and not just variables rust-lang/rust-clippy#11306.Per-path lint levels for
DisallowedPath
-related lints.DisallowedPath
rust-lang/rust-clippy#11307.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
:core::ffi::c_*
cases rust-lang/rust-clippy#13494.unnecessary_cast
does not trigger with a local but it does with a parameter.unnecessary_cast
false negative: parameter vs. local rust-lang/rust-clippy#13495.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.
undocumented_unsafe_blocks
) rust-lang/rust-clippy#13316.unnecessary_safety_comment
) rust-lang/rust-clippy#13317.Avoid inherent methods on generic smart pointers.
Split
needless_lifetimes
.clippy::all
lint that weallow
.needless_lifetimes
into cases that do and do not require'_
rust-lang/rust-clippy#13514.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.unsafe extern
support (undocumented_unsafe_blocks
?) rust-lang/rust-clippy#13560.Overindented lines lint (similar to
doc_lazy_continuation
).doc_lazy_continuation
) rust-lang/rust-clippy#13601.doc_overindented_list_items
rust-lang/rust-clippy#13711.Unneeded
rust
as language inrustdoc
's documentation examples.rust
as language inrustdoc
's documentation examples rust-lang/rust-clippy#13604.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.check-private-items
configuration for different lints rust-lang/rust-clippy#13074.Done (stabilized, fixed, not needed anymore, etc.)
Support/document running Clippy as a
rustc
wrapper.Configuring lint levels when using
clippy-driver
.clippy-driver
rust-lang/rust-clippy#6799.Normalize semicolon inside/outside blocks for
()
returning expressions (semicolon_outside_block
andsemicolon_inside_block
, 1.68.0).()
returning expressions rust-lang/rust-clippy#7322.Lint to warn about missing
// SAFETY:
explanations (undocumented_unsafe_blocks
, 1.58.0).unsafe
blocks to have comments explaining why the required invariants hold rust-lang/rust-clippy#9330.Lint to warn about unexpected
# Safety
contracts (i.e. the reverse of themissing_safety_doc
lint) (unnecessary_safety_doc
, 1.67.0).unnecessary_safety_doc
lint rust-lang/rust-clippy#9822.Lint to warn about unexpected
// SAFETY:
comments (i.e. the reverse of theundocumented_unsafe_blocks
lint) (unnecessary_safety_comment
, 1.67.0).unnecessary_safety_comment
): reverse ofundocumented_unsafe_blocks
rust-lang/rust-clippy#7954.// SAFETY:
comments also for explaining why safe code makes other unsafe code sound, though.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.undocumented_unsafe_blocks
false positives around attributes rust-lang/rust-clippy#13189.disallowed_macros
false negatives.dbg_macro
emulation purposes.disallowed_macros
false negatives rust-lang/rust-clippy#11431.$t + $t
case): Check binary operators and attributes in disallowed_macros rust-lang/rust-clippy#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.)
README
: document that Clippy may change codegen.clippy-driver
be always used as replacement ofrustc
? rust-lang/rust-clippy#8035.README
: document that Clippy may change codegen rust-lang/rust-clippy#8037 (1.60).new_ret_no_self
false positive when returningimpl Trait<Self>
.pin-init
usage.new_ret_no_self
false positive when returningimpl Trait<Self>
rust-lang/rust-clippy#7344.macro_metavars_in_unsafe
false negative without statement.macro_metavars_in_unsafe
does not lint "without a statement". rust-lang/rust-clippy#13219.macro_metavars_in_unsafe
]: recognize metavariables in tail expressions rust-lang/rust-clippy#13220 (1.82?).The text was updated successfully, but these errors were encountered: