diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-06-09 13:18:00 +0200 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-06-11 12:36:56 +0200 |
| commit | 7a62380fc8f8ca39bc49b8f67a4d4929911cb036 (patch) | |
| tree | 60cdea00b5a1f4c48aec1bae2cb395ca92eb456c | |
| parent | f1d5cd5d13bbd59c21e70e2e728c3db9829cf816 (diff) | |
| download | rust-7a62380fc8f8ca39bc49b8f67a4d4929911cb036.tar.gz rust-7a62380fc8f8ca39bc49b8f67a4d4929911cb036.zip | |
clippy-driver: fix test and add --rustc to --help output
| -rw-r--r-- | .github/driver.sh | 6 | ||||
| -rw-r--r-- | src/driver.rs | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/.github/driver.sh b/.github/driver.sh index f8139f36369..2c17c4203ae 100644 --- a/.github/driver.sh +++ b/.github/driver.sh @@ -31,9 +31,11 @@ diff normalized.stderr tests/ui/cstring.stderr SYSROOT=`rustc --print sysroot` diff <(LD_LIBRARY_PATH=${SYSROOT}/lib ./target/debug/clippy-driver --rustc --version --verbose) <(rustc --version --verbose) + +echo "fn main() {}" > target/driver_test.rs # we can't run 2 rustcs on the same file at the same time -CLIPPY=`LD_LIBRARY_PATH=${SYSROOT}/lib ./target/debug/clippy-driver tests/driver/main.rs` -RUSTC=`rustc tests/driver/main.rs` +CLIPPY=`LD_LIBRARY_PATH=${SYSROOT}/lib ./target/debug/clippy-driver ./target/driver_test.rs --rustc` +RUSTC=`rustc ./target/driver_test.rs` diff <($CLIPPY) <($RUSTC) # TODO: CLIPPY_CONF_DIR / CARGO_MANIFEST_DIR diff --git a/src/driver.rs b/src/driver.rs index 5ef8d3cf809..6faa5e9fe66 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -207,6 +207,7 @@ Usage: Common options: -h, --help Print this message + --rustc Pass all args to rustc -V, --version Print version info and exit Other options are the same as `cargo check`. |
