Skip to content

Commit

Permalink
clippy-driver: fix test and add --rustc to --help output
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jun 11, 2020
1 parent f1d5cd5 commit 7a62380
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/driver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 7a62380

Please sign in to comment.