-
Notifications
You must be signed in to change notification settings - Fork 735
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 clippy lints #477
Fix clippy lints #477
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the work! I have a few changes I'd like to make if possible.
Also, it looks like CI is failing because rustfmt needs to be run: https://dev.azure.com/tracing/tracing/_build/results?buildId=1303&view=logs&j=d58818d2-6188-5422-441f-033b6bb63300&t=5fc570b0-d721-5027-b19d-e5c09c36d0ce I find that kind of amusing, it's like a battle of the linters. |
Yeah… 🙂 I thought I ran Thanks for the quick feedback! |
In the latest commits I've removed the global allows and instead added a |
Just a note, I still plan to make the other suggested changes. |
Alright, I think I've made the suggested changes and removed as many of the clippy allows as possible. See the comment about the |
ae46e52
to
edf9461
Compare
Looks like CI is still failing for some reason but I can't figure out why. |
a30f146
to
975384f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like CI is still failing for some reason but I can't figure out why.
I believe the CI failure is unrelated. It's due to a Cargo change in 1.40.0 that breaks the Azure Pipelines config: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#changed-1
We should probably address that separately. Besides that, I think this PR looks good.
By including a clippy.toml
and Clippy attributes in the project, I think we are now publicly committing to using Clippy — if that's the case, we should probably be running it on CI as well. However, I think we should do that in a separate branch. If you don't mind opening an issue for that, that would be great!
Again, thanks for sticking with this!
@darinmorrison is this ready to merge? It looks like everything has been squashed down. Were you planning on making any additional changes? For what it's worth, it's not actually necessary to squash in progress PRs; we squash everything automatically when merging: https://github.com/tokio-rs/tracing/blob/master/CONTRIBUTING.md#commit-squashing |
Going to add that one last comment about module inception then it's ready to go! |
975384f
to
4343ffa
Compare
@hawkw Okay I think it's ready now. Good to know about squashing commits for future reference. |
I believe I've fixed all the CI issues that are causing builds to hang. @darinmorrison can I get you to trigger a new build by pushing an empty commit to this branch? You can do this using git commit -m "restart CI" --allow-empty && git push or similar. Thanks! |
@hawkw sorry I missed your comment earlier. Just pushed to restart CI now. |
@darinmorrison Okay, now that you triggered a new build, CI is passing again, so I've gone ahead and merged this branch. Thanks again for working on this! |
No problem! I still plan to make the PR for clippy on CI too by the way. |
This is a follow up PR for #477 that runs clippy on CI. * Switch from hecrj/setup-rust-action to actions-rs/toolchain * Fix remaining clippy lints * Switch to minimal rustup profile * Replace warning step with clippy * Remove #![feature(async_await)]
This PR fixes all reported clippy lints. In most cases I have made the suggested changes. In a few cases (e.g.,
blacklisted_name
andcognitive_complexity
) I've just silenced the warning.I can make stylistic changes or discard some of the lint fixes if preferred.