| 30 | } |
| 31 | |
| 32 | fn make_options_parser<'help>() -> Command<'help> { |
| 33 | let parser = Command::new("LOCKBUD") |
| 34 | .no_binary_name(true) |
| 35 | .version("v0.2.0") |
| 36 | .arg( |
| 37 | Arg::new("kind") |
| 38 | .short('k') |
| 39 | .long("detector-kind") |
| 40 | .possible_values(["deadlock", "atomicity_violation", "memory", "all", "panic"]) |
| 41 | .default_values(&["deadlock"]) |
| 42 | .help("The detector kind"), |
| 43 | ) |
| 44 | .arg( |
| 45 | Arg::new("black") |
| 46 | .short('b') |
| 47 | .long("blacklist-mode") |
| 48 | .takes_value(false) |
| 49 | .help("set `crates` as blacklist than whitelist"), |
| 50 | ) |
| 51 | .arg( |
| 52 | Arg::new("crates") |
| 53 | .short('l') |
| 54 | .long("crate-name-list") |
| 55 | .takes_value(true) |
| 56 | .help("The crate names seperated by ,"), |
| 57 | ); |
| 58 | parser |
| 59 | } |
| 60 | |
| 61 | #[derive(Debug)] |
| 62 | pub struct Options { |