commit
fa67e091e4
@ -811,7 +811,7 @@ pub fn optgroups() -> ~[getopts::groups::OptGroup] {
|
||||
for detail)", "FEATURE"),
|
||||
optopt("", "android-cross-path",
|
||||
"The path to the Android NDK", "PATH"),
|
||||
optmulti("W", "warn",
|
||||
optflagopt("W", "warn",
|
||||
"Set lint warnings", "OPT"),
|
||||
optmulti("A", "allow",
|
||||
"Set lint allowed", "OPT"),
|
||||
|
@ -228,9 +228,14 @@ pub fn run_compiler(args: &~[~str], demitter: diagnostic::Emitter) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Display the available lint options if "-W help" or only "-W" is given.
|
||||
let lint_flags = vec::append(getopts::opt_strs(matches, "W"),
|
||||
getopts::opt_strs(matches, "warn"));
|
||||
if lint_flags.contains(&~"help") {
|
||||
|
||||
let show_lint_options = lint_flags.contains(&~"help") ||
|
||||
(opt_present(matches, "W") && lint_flags.is_empty());
|
||||
|
||||
if show_lint_options {
|
||||
describe_warnings();
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user