bevy-website icon indicating copy to clipboard operation
bevy-website copied to clipboard

Docs tell contributors to run clippy with incomplete set of lints.

Open rparrett opened this issue 3 years ago • 5 comments

https://github.com/bevyengine/bevy/pull/4665 added some new clippy lints a while back, but

https://github.com/bevyengine/bevy-website/blob/master/content/learn/book/contributing/code/_index.md?plain=1#L20

still tells you to run the old set of lints.

This seems to be what CI is running now:

cargo clippy --workspace --all-targets --all-features -- -A clippy::type_complexity -W clippy::doc_markdown -W clippy::redundant_else -W clippy::match_same_arms -W clippy::semicolon_if_nothing_returned -W clippy::explicit_iter_loop -W clippy::map_flatten -D warnings

Which is a bit of a mouthful.

rparrett avatar Sep 09 '22 03:09 rparrett

keeping that information synced between code used by CI, https://github.com/bevyengine/bevy/blob/main/CONTRIBUTING.md and https://github.com/bevyengine/bevy-website/blob/master/content/learn/book/contributing/code/_index.md seems a bad idea, could we remove at least one of them?

mockersf avatar Sep 09 '22 06:09 mockersf

@mockersf

keeping that information synced between code used by CI, https://github.com/bevyengine/bevy/blob/main/CONTRIBUTING.md and https://github.com/bevyengine/bevy-website/blob/master/content/learn/book/contributing/code/_index.md seems a bad idea, could we remove at least one of them?

Can we just add #[allow(clippy::type_complexity)] etc. to every crate? That's a bit of duplication, but AFAIK there is no "workspace lint configuration" and I would really like to just be able to cargo clippy -p whatever_crate_i_want without always having to remember bevy's special lints or using cargo run -p ci which checks way more than necessary.

jakobhellermann avatar Oct 29 '22 09:10 jakobhellermann

Can we just add #[allow(clippy::type_complexity)] etc. to every crate?

To be honest I think we should stop allowing it on clippy level and just allow it on lines where it's needed instead of everywhere.

you can also run cargo run -p ci -- clippy to just run clippy

mockersf avatar Oct 29 '22 17:10 mockersf

To see if I understand correctly: The desired solution is to remove the redefinition of the manual command so as to avoid having to maintain changes to it as it changes. Instead just leave the regular CI command in the book?

TrialDragon avatar Jan 17 '24 04:01 TrialDragon

we are moving more and more to clippy configuration, and lint management on crate level, so I'm not sure this part is relevant anymore

mockersf avatar Jan 17 '24 07:01 mockersf

The contributing section of the website has been removed to prevent duplicated and outdated information. This issue is no longer applicable.

BD103 avatar Feb 27 '24 03:02 BD103