8000 Clippy: Move configuration to Cargo.toml by bradjc · Pull Request #4082 · tock/tock · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Clippy: Move configuration to Cargo.toml #4082

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

Merged
merged 4 commits into from
Jul 11, 2024
Merged

Clippy: Move configuration to Cargo.toml #4082

merged 4 commits into from
Jul 11, 2024

Conversation

bradjc
Copy link
Contributor
@bradjc bradjc commented Jul 10, 2024

Pull Request Overview

As of last year I think (rust-lang/rfcs#3389) we can now control clippy configs in the workspace Cargo.toml. This means we do not need our run_clippy script and that cargo clippy just works.

The downside is every Cargo.toml needs

[lints]
workspace = true

but what can you do.

Testing Strategy

travis

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

@github-actions github-actions bot added kernel sam4l Change pertains to the SAM4L MCU. nrf Change pertains to the nRF5x family of MCUs. tock-libraries This affects libraries supported by the Tock project risc-v RISC-V architecture WG-OpenTitan In the purview of the OpenTitan working group. stm32 Change pertains to the stm32 family of MCUSs component labels Jul 10, 2024
Copy link
Member
@lschuermann lschuermann left a comment

Choose a reason for hiding this comment

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

Woohoo! Fewer magic Makefile incantations!

@ppannuto ppannuto added the last-call Final review period for a pull request. label Jul 10, 2024
@brghena
Copy link
Contributor
brghena commented Jul 11, 2024

Looks like others have run into the inheritance problem as well: oxidecomputer/omicron#5715

This seems to be the relevant issue for inheritance: rust-lang/cargo#12208

Copy link
Contributor
@brghena brghena left a comment

Choose a reason for hiding this comment

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

I wonder how often we're going to forget to add this to a Cargo.toml when making a new one? Hopefully that you've added them to every example in Tock means people will just copy-paste and won't forget it.

@bradjc
Copy link
Contributor Author
bradjc commented Jul 11, 2024

Worse, if you do forget, you might end up fixing clippy lints that seem "odd" because they are on by default but all other tock code doesn't use them.

@lschuermann lschuermann added this pull request to the merge queue Jul 11, 2024
Merged via the queue into master with commit a95c618 Jul 11, 2024
18 checks passed
@lschuermann lschuermann deleted the cargo-clippy branch July 11, 2024 17:25
@hudson-ayers
Copy link
Contributor
hudson-ayers commented Aug 25, 2024

the best thing about this is that cargo clippy --fix just works now, which is sooo nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component kernel last-call Final review period for a pull request. nrf Change pertains to the nRF5x family of MCUs. risc-v RISC-V architecture sam4l Change pertains to the SAM4L MCU. stm32 Change pertains to the stm32 family of MCUSs tock-libraries This affects libraries supported by the Tock project WG-OpenTitan In the purview of the OpenTitan working group.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0