gitoxide
gitoxide copied to clipboard
OCD: Satisfy some pedantic clippies
I just ran cargo clippy --workspace --tests --bins --lib --benches --examples -- -W clippy::pedantic 2>&1 | rg --trim -- '-W clippy::' | sort | uniq -c | sort -h -r
and got this list of currently failing pedantic issues (reformatted). Some probably should not be implemented. The command above uses ripgrep.
- [ ] x52
clippy::semicolon-if-nothing-returned
~- [ ] x48clippy::must-use-candidate
~ ~- [ ] x44clippy::missing-errors-doc
~ - [ ] x36
clippy::redundant-closure-for-method-calls
- [ ] x172 clippy::unwrap_used
- [ ] x36
clippy::default-trait-access
- [x] x33
clippy::doc-markdown
#876 - [x] ~~x29
clippy::enum-glob-use
~~ #903 - [ ] x28
clippy::items-after-statements
- [ ] x27
clippy::needless-pass-by-value
- [ ] x26
clippy::too-many-lines
- [ ] x21
clippy::missing-panics-doc
- [ ] x19
clippy::single-match-else
- [ ] x16
clippy::unnecessary-wraps
- [x] x16
clippy::implicit-clone
#873 - [ ] x15
clippy::return-self-not-must-use
- [ ] x15
clippy::module-name-repetitions
- [ ] x15
clippy::match-same-arms
- [ ] x13
clippy::unreadable-literal
- [ ] x13
clippy::cast-possible-truncation
- [ ] x11
clippy::similar-names
- [ ] x11
clippy::redundant-else
- [ ] x11
clippy::if-not-else
- [ ] x11
clippy::cast-lossless
- [ ] x8
clippy::trivially-copy-pass-by-ref
- [ ] x8
clippy::struct-excessive-bools
- [ ] x7
clippy::match-wildcard-for-single-variants
- [ ] x7
clippy::explicit-into-iter-loop
- [ ] x6
clippy::cast-precision-loss
- [ ] x5
clippy::manual-string-new
- [ ] x5
clippy::inconsistent-struct-constructor
- [ ] x5
clippy::from-iter-instead-of-collect
- [ ] x5
clippy::cast-sign-loss
- [ ] x4
clippy::wildcard-imports
- [ ] x4
clippy::inefficient-to-string
- [x] x4
clippy::cloned-instead-of-copied
#875 - [ ] x3
clippy::used-underscore-binding
- [ ] x3
clippy::unused-self
- [ ] x3
clippy::let-underscore-untyped
- [ ] x3
clippy::explicit-deref-methods
- [ ] x3
clippy::cast-possible-wrap
- [ ] x2
clippy::range-plus-one
- [ ] x2
clippy::match-wild-err-arm
- [ ] x2
clippy::iter-not-returning-iterator
- [ ] x2
clippy::inline-always
- [ ] x2
clippy::flat-map-option
- [ ] x2
clippy::borrow-as-ptr
- [ ] x1
clippy::unsafe-derive-deserialize
- [ ] x1
clippy::unnecessary-join
- [ ] x1
clippy::transmute-ptr-to-ptr
- [ ] x1
clippy::no-effect-underscore-binding
- [ ] x1
clippy::mut-mut
- [ ] x1
clippy::match-bool
- [ ] x1
clippy::manual-assert
- [ ] x1
clippy::filter-map-next
- [ ] x1
clippy::copy-iterator
- [ ] x1
clippy::checked-conversions
- [ ] x1
clippy::bool-to-int-with-if
Thanks for your involvement and enthusiasm to make the codebase better! It's good to see that not all of these have to be implemented 'just to be implemented', but overall the goal here is to make the code more readable and more idiomatic (which probably is another way of saying the same thing, who knows).
With that said, I hope you don't mind owning this tracking ticket, and you are welcome to work on it as well :).
Thx @Byron , I will (slowly) try to hack on these. One of my "side goals" is to improve Clippy itself, so working on a large code base like yours allows one to spot issues there. Also, the side benefit is that it helps optimize the size and performance of the codebase itself, so we all win :)
clippy::redundant-closure-for-method-calls
has been done
clippy::default-trait-access
I find this one really noisy for nor much gain, I'm going to skip it
clippy::enum-glob-use
Refused in #903, should be crossed out
This list has been updated with the new generation method