pacak / bpaf

Command line parser with applicative interface
337 stars 17 forks source link

Fix clippy lints, or are they being ignored on purpose? #338

Open bzm3r opened 7 months ago

bzm3r commented 7 months ago

There are some clippy warnings throughout the project.

Should these be fixed, or are they meant to be ignored on purpose?

(I can submit a PR with fixes, if they are meant to be fixed.)

pacak commented 7 months ago

Hmm... I'm trying to keep it clean from clippy complains and formatting. Any ideas why CI isn't catching them?

As far as fixing them - _documentation.rs is generated and I'm removing it in the big rewrite branch (pushed as concrete2), some renames might make sense - I'll take a look at that. ShortLong::ShortLong can be ShortLong::Both I guess...

vallentin commented 5 months ago

The CI actually is outputting all the warnings. The issue is that only the cargo doc check includes -D warnings.

https://github.com/pacak/bpaf/blob/b7c0b16831ee816daa6e9b0f5c59d3ca489f26dd/.github/workflows/check-and-lint.yaml#L41-L65

In short, the following change is needed for the clippy check(s), to catch warnings:

- cargo clippy --workspace --all-targets
+ cargo clippy --workspace --all-targets -- -D warnings

Adding -D warnings to the clippy check(s), should be enough to catch all the warnings.

Check out the workflow we're using for Askama.