rust-lang/rust-clippy
View on GitHub ↗ ★ 13,609 Rust
A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
19 mentions on Hacker News by 19 people: 1 story, 18 comments · first 2019-02-20 · latest 2026-09-13
20082026
-
…a phenomenon of older generations that grew up with C and never inherited eg. cobol on mainframes. https://github.com/rust-lang/rust-clippy
comment by throwawayqqq11 · 2026-09-13 · in From Git to Fossil (2025) -
…even then it had to be annotated as `unsafe`. It was then deprecated and a linter check was added: https://github.com/rust-lang/rust-clippy/issues/7681
comment by cyberax · 2026-04-29 · in Bugs Rust won't catch -
…std::future::ready(return_value). They even developed a lint[1] to help users find these cases. https://github.com/rust-lang/rust-clippy/pull/16244 Could the compiler not identify this case and perform the transformation automatically?
comment by infogulch · 2026-04-17 · in Debloat Your Async Rust -
While that is true, there are clippy::indexing_slicing, clippy::string_slice for that: https://github.com/rust-lang/rust-clippy/issues/8184#issuecomment-1003651774 error: indexing may panic --> src/main.rs:100:57 | 100 |…
comment by sshine · 2024-11-26 · in Lies we tell ourselves to keep using Golang (2022) -
…or enum) would be repeated back in the impl block there is a nice discussion on this issue here: https://github.com/rust-lang/rust-clippy/issues/1689
comment by zamio · 2023-07-23 · in More than you've ever wanted to know about errors in Rust (2022) -
…massive Future struct, which caused a stack overflow :) I wish there was a Clippy lint for this ( https://github.com/rust-lang/rust-clippy/issues/5263 ). My current practice is to sprinkle `Box::pin` on code paths that are less common…
comment by pornel · 2023-01-28 · in The Size of Rust Futures -
…way to avoid simple mistakes is to configure Clippy to run on your IDE (or just run it manually): https://github.com/rust-lang/rust-clippy
comment by brabel · 2022-08-25 · in Rust – A hard decision pays off -
…to be second-guessed by a robot overlord (proof: Clippy). People in the Rust community love clippy. https://github.com/rust-lang/rust-clippy
comment by carlmr · 2022-05-18 · in Solar-powered desalination device wins MIT $100K competition -
…[2] https://spotbugs.github.io/ [3] http://mypy-lang.org/ [4] https://github.com/rust-lang/rust-clippy
comment by uluyol · 2021-12-30 · in Go CheckLocks Analyzer -
…https://rust-lang.github.io/rust-clippy/master/#large_types_... The default threshold is 256 bytes: https://github.com/rust-lang/rust-clippy/blob/1fc1aee7be6e7e... So you might use that as a rule of thumb. But officially, "Generally…
comment by hcs · 2021-08-18 · in Rust API Guidelines Checklist -
…though not all (I'm not aware of a tool to check for uses of bad ciphers in Rust for example). [1]: https://github.com/rust-lang/rust-clippy [2]: https://github.com/rustsec/rustsec
comment by pcwalton · 2021-08-05 · in Golang Security Checker -
Maybe we can combine it with Rust's clippy for displaying the error messages. https://github.com/rust-lang/rust-clippy
comment by pjmlp · 2021-06-14 · in Clippy in VSCode -
…to avoid the clean/rebuild. Hopefully stuff gets stabilized soon. Here's the issue for reference: https://github.com/rust-lang/rust-clippy/issues/4612
comment by badtuple · 2021-01-03 · in Rust Design Patterns as a Book -
Rust has a tool called, you guessed it, Clippy, that does very similar things to what you suggest: https://github.com/rust-lang/rust-clippy The Rust compiler exposes a lot of information, so it's actually quite powerful in my experience.
comment by Huggernaut · 2020-11-20 · in TypeScript 4.1 -
…magic and sudden changes in behavior because some threshold has been passed in some optimizer. [1]: https://github.com/rust-lang/rust-clippy/pull/5466 [2]: https://github.com/rust-lang/rust-clippy/issues/14
comment by estebank · 2020-06-16 · in Generics and Compile-Time in Rust -
▲ 1
Most Commonly Ignored Lintsstory by lukastyrychtr · 2020-04-10 · 0 comments
-
It does not. I know because I advocated against it. :-) https://github.com/rust-lang/rust-clippy/issues/1300 Also, Clippy's defaults are developed to be quite opinionated. It makes many suggestions that I (and many others) disagree with.…
comment by burntsushi · 2019-12-11 · in Speeding Up the Rust Compiler -
…not rigorous. I would love to see a lint for known-blocking constructs in async contexts, though: https://github.com/rust-lang/rust-clippy/issues/4377 Also, having explicit imports and types that name collide helps there for once.
comment by Argorak · 2019-08-16 · in Async-std: an async port of the Rust standard library -
There is work being done now to improve this situation for clippy. https://github.com/rust-lang/rust-clippy/issues/2604
comment by JoshMcguigan · 2019-02-20 · in Reflections on Learning Rust by Building Punchtop