Skip to content

Allow running cargo dev lint on a package directory #8607

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 1 commit into from
Apr 5, 2022

Conversation

Alexendoo
Copy link
Member

Allows you run the local clippy in a specified directory, e.g. allowing

# Lint a ui-cargo test
cargo dev lint tests/ui-cargo/wildcard_dependencies/fail

# Lint some other project
cargo dev lint ~/my-project

The target directory is set to a tempdir which isn't ideal for medium/large projects as it would be compiled from scratch. This is to avoid cached clippy messages where you cargo dev lint dir, change something in clippy, and run cargo dev lint dir again

changelog: Dev: cargo dev lint can now be run on a package directory

@rust-highfive
Copy link

r? @giraffate

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 29, 2022
Copy link
Contributor

@giraffate giraffate left a comment

Choose a reason for hiding this comment

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

It looks good, but I'm unfamiliar with this code, so can anyone do another review for this?
@rust-lang/clippy

@flip1995
Copy link
Member

flip1995 commented Apr 5, 2022

LGTM. The tempfile doesn't seem to increase the time this takes to build on CI, so adding this should be fine and don't lead to increased build times. They were just reduced in #8605 and I don't want to increase them again.

@bors r=flip1995,giraffate

@bors
Copy link
Contributor

bors commented Apr 5, 2022

📌 Commit 9a02386 has been approved by flip1995,giraffate

@bors
Copy link
Contributor

bors commented Apr 5, 2022

⌛ Testing commit 9a02386 with merge 01ea624...

@bors
Copy link
Contributor

bors commented Apr 5, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995,giraffate
Pushing 01ea624 to master...

@bors bors merged commit 01ea624 into rust-lang:master Apr 5, 2022
@Alexendoo Alexendoo deleted the cargo-dev-lint-dir branch April 5, 2022 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants