mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-27 15:11:30 +00:00
Ensure a non-zero value is returned by clippy if compilation fails
This commit is contained in:
parent
cd90441a73
commit
5be00bcd18
1 changed files with 7 additions and 2 deletions
|
@ -13,7 +13,7 @@ extern crate rustc_plugin;
|
|||
extern crate syntax;
|
||||
|
||||
use rustc_driver::{driver::CompileController, Compilation};
|
||||
use std::process::Command;
|
||||
use std::process::{exit, Command};
|
||||
|
||||
#[allow(print_stdout)]
|
||||
fn show_version() {
|
||||
|
@ -133,5 +133,10 @@ pub fn main() {
|
|||
}
|
||||
controller.compilation_done.stop = Compilation::Stop;
|
||||
|
||||
rustc_driver::run_compiler(&args, Box::new(controller), None, None);
|
||||
if rustc_driver::run_compiler(&args, Box::new(controller), None, None)
|
||||
.0
|
||||
.is_err()
|
||||
{
|
||||
exit(101);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue