Your Rust Clippy Config Should Be Stricter

(emschwartz.me)

5 points | by emschwartz 8 hours ago ago

1 comments

  • stop50 3 hours ago

    Thats what i implemented for myself. I made myself pre commit hooks for running clippy nightly and deploying my standard lints(clippy and non-clippy). Thanks to jq-lang and the jq-wrapper tomlq it can even work around the lints/workspace.lints difference with little problems.

    For myself i have forbidden unwrap/expect, since this can lead to panics. For cases where an unwrap IS unavoidable, i use unsafe {unwrap_unchecked}. The unsafe is to make sure i can't overlook it.