Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix overly strict clippy lint #172

Merged
merged 1 commit into from
May 16, 2024
Merged

Fix overly strict clippy lint #172

merged 1 commit into from
May 16, 2024

Conversation

ten3roberts
Copy link
Contributor

Deny style, suspicious and complexity categories, rather than all warnings

If we find issues that could have been caught by a clippy lint we can add that lint on as deny too, as for now, they still appear as warnings but won't prevent CI from running.

This most notably fixes random CI breakages when clippy/rust updates and introduces new warn level lints

@@ -135,8 +135,7 @@ jobs:
- uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-targets --all-features -- -D warnings

args: --all-targets --all-features -- -D clippy::style -D clippy::suspiscious -D clippy::complexity
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of doing it like this, it might be worth changing the stable to an MSRV.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, pinning the clippy version

Only danger with that is that we may not update it for a while and not get new "good to deny by default" lints.

This primarily solves the overly pedantic lints, while still giving us all the new ones as warnings.

Both are good

Maybe a combination?

Sticking to latest also makes it easier to run clippy locally, as you don't have to track which version, especially for new contributors who aren't aware of it, not understanding why there are different results.

But that is just a minor thing.

@pksunkara pksunkara merged commit a0f3f64 into master May 16, 2024
29 checks passed
@pksunkara pksunkara deleted the fix-clippy branch May 16, 2024 12:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants