-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Start making clippy easier to invoke in non-cargo contexts #3665
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.
You ran into some dogfood failures: https://travis-ci.com/rust-lang/rust-clippy/jobs/170625109#L1306
@oli-obk Clippy's advice for https://travis-ci.com/rust-lang/rust-clippy/jobs/170625109#L1309 is wrong and would not compile - this is an explicit while because it also advances the iterator within the body. Should I just suppress that particular clippy warning for the function? |
Yes, please do. And file a bug for that false positive. |
132c086
to
7d9799f
Compare
retriggering CI |
Looks like it just needs a small rustfmt fix: https://travis-ci.com/rust-lang/rust-clippy/jobs/173272226#L1397 |
400079c
to
41100d8
Compare
I fixed the formatting, but the tests seem to be failing for unrelated reasons which is preventing me from making sure the tests I added are actually working. |
huh that's a weird CI failure indeed. Some UI tests seem to have no stderr output? I will trigger a new build and see if it still happens. |
☔ The latest upstream changes (presumably #2857) made this pull request unmergeable. Please resolve the merge conflicts. |
The weird UI test failures seem to have gone away now. I'm not sure where they came from, tbh. It looks like the output of the |
Rather than looking for a fixed --emit arg set, just check to see if we're emitting metadata at all. This makes it more robust to being invoked by tools other than cargo (or if cargo changes its invocation). Issue rust-lang#3663
If the user explicitly sets sysroot on the command line, then use that value. Issue rust-lang#3663
CARGO_MANIFEST_DIR if it isn't set. If CARGO_MANIFEST_DIR isn't set, fall back "." rather than panicing. Issue rust-lang#3663
It saves on having to pair `cd <path> && think && cd ..`.
@phansch It hasn't changed, but clippy is being invoked differently I think. I'm still trying to understand how all the ui tests actually get invoked. |
@bors r+ |
📌 Commit f0131fb has been approved by |
Start making clippy easier to invoke in non-cargo contexts Clippy (clippy-driver) currently has a couple of strong but unnecessary couplings with cargo. This series: 1. makes detection of check builds more robust, and 2. make clippy-driver use the --sysroot specified on the command line as its internal sysroot.
☀️ Test successful - checks-travis, status-appveyor |
Clippy (clippy-driver) currently has a couple of strong but unnecessary couplings with cargo. This series: