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

Lintcheck and an options for command line options #6750

Merged
merged 4 commits into from
Feb 17, 2021

Conversation

flip1995
Copy link
Member

Make it possible to add command line options to the clippy invocation of the lintcheck-tool

changelog: none

r? @matthiaskrgr

I found that this will be really helpful if we use a separate repository and want to maintain a all-lints-passing list of crates. See my early experimentation here: https://github.com/flip1995/clippy-lintcheck

git submodule update --init
cargo run -- --mode=all

Will run the lintcheck tool on all the specified crates in config/ in that repository.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Feb 16, 2021
clippy_dev/README.md Outdated Show resolved Hide resolved
clippy_dev/README.md Show resolved Hide resolved
clippy_dev/src/lintcheck.rs Show resolved Hide resolved
@matthiaskrgr matthiaskrgr added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Feb 16, 2021
@matthiaskrgr
Copy link
Member

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Feb 17, 2021

📌 Commit 79d7f4c has been approved by matthiaskrgr

@bors
Copy link
Collaborator

bors commented Feb 17, 2021

⌛ Testing commit 79d7f4c with merge ddeea97...

@bors
Copy link
Collaborator

bors commented Feb 17, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: matthiaskrgr
Pushing ddeea97 to master...

@bors bors merged commit ddeea97 into rust-lang:master Feb 17, 2021
@flip1995 flip1995 deleted the lintcheck_options branch February 17, 2021 13:30
@matthiaskrgr
Copy link
Member

Hmm, I think this broke something :(
It seems that only -git source-results are stored in the log now for some reason.

@flip1995
Copy link
Member Author

Huh, it worked for me locally. Can you try to delete the target/lintcheck/shared_something_somethin and check if it is a caching issue?

@matthiaskrgr
Copy link
Member

The problem is, when I run /home/matthias/vcs/github/rust-clippy/target/debug/cargo-clippy on ~/vcs/github/rust-clippy/target/lintcheck/crates/xsv-0.13.0, I get

current:   /home/matthias/vcs/github/rust-clippy/target/lintcheck/crates/xsv-0.13.0/Cargo.toml
workspace: /home/matthias/vcs/github/rust-clippy/Cargo.toml

this may be fixable by ensuring that this crate is depended on by the workspace root: /home/matthias/vcs/github/rust-clippy/Cargo.toml
Alternatively, to keep it out of the workspace, add the package to the `workspace.exclude` array, or add an empty `[workspace]` table to the package's manifest.

🤔

@matthiaskrgr
Copy link
Member

CC #6749 ?

@flip1995
Copy link
Member Author

Oh yeah, that is #6749

@matthiaskrgr
Copy link
Member

Adding the target directory to workspace.exlude does not seem to work because the path is expected to point at a specific crate, mh...

@flip1995
Copy link
Member Author

Maybe let the lintcheck tool add the crates to Cargo.toml, run the check and remove them again? But that seems way to hacky.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants