-
Notifications
You must be signed in to change notification settings - Fork 23
Closed
Description
Enforce additional clippy lints in Cargo.toml and have crates inherit.
[lints.clippy]
# Correctness & Safety
unwrap_used = "warn" # Prefer expect() or proper error handling
expect_used = "warn" # Even stricter - force Result handling
panic = "warn" # No panics in library code
indexing_slicing = "warn" # Use .get() instead of [i]
# Performance
inefficient_to_string = "warn"
needless_collect = "warn"
needless_pass_by_value = "warn"
trivially_copy_pass_by_ref = "warn"
unnecessary_box_returns = "warn"
# Code Quality
clone_on_ref_ptr = "warn" # Explicit Arc::clone() over .clone()
dbg_macro = "warn" # No dbg! in production
print_stdout = "warn" # No println! in libraries
todo = "warn" # No TODO in productioncargo clippy -- -W clippy::pedantic 2>&1 | grep -o -i warning | wc -l came in at 735. So I do not recommend starting there.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels