nearcore icon indicating copy to clipboard operation
nearcore copied to clipboard

Revisit Clippy whitelisting

Open bowenwang1996 opened this issue 5 years ago • 8 comments

We should start enabling [clippy](https://github.com/rust-lang/rust-clippy) gradually. To do that, we should first figure out which rules trigger warnings and document them. The purpose of this issue is to get a list of clippy rules that we do not follow now so that we can fix them in the future.

bowenwang1996 avatar Jan 20 '19 06:01 bowenwang1996

I assigned L1 implying that initial items should not be huge and Clippy + Rust compiler should guide us through, but if a bigger refactoring is necessary, we should decouple those into separate dedicated issues.

frol avatar Jun 04 '21 05:06 frol

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 02 '21 06:09 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 01 '21 18:12 stale[bot]

@matklad @nagisa curious what your thoughts are on this topic

bowenwang1996 avatar Dec 02 '21 13:12 bowenwang1996

While I am not a huge fan of clippy, for a big project with many developers, like nearcore, I think enabling clippy would be a net benefit, so we should do that.

Though, in terms of "keeping the code base sane", I don't think that's the most impactful thing. I'd say we should fix #4490 and improve compile times (by auditing our deps in Cargo.lock and cutting the cruft out) first.

matklad avatar Dec 02 '21 13:12 matklad

i definitely seen bugs being caught by clippy in CI, so I'm in favour of adding some of the clippy lints to at least CI.

nagisa avatar Dec 02 '21 15:12 nagisa

I'm a big favor of clippy. I detected many potential issues ahead of time. It also has many useful suggestions on how to write a cleaner, more readable code.I think we should enable it by default.

pmnoxx avatar Jan 03 '22 18:01 pmnoxx

This issue has been automatically marked as stale because it has not had recent activity in the last 2 months. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 03 '22 19:04 stale[bot]