for details)", "FEATURE"),
optopt("", "android-cross-path",
"The path to the Android NDK", "PATH"),
- optflagopt("W", "warn",
+ optmulti("W", "warn",
"Set lint warnings", "OPT"),
optmulti("A", "allow",
"Set lint allowed", "OPT"),
return;
}
- // Display the available lint options if "-W help" or only "-W" is given.
let lint_flags = vec::append(matches.opt_strs("W"),
matches.opt_strs("warn"));
-
- let show_lint_options = lint_flags.iter().any(|x| x == &~"help") ||
- (matches.opt_present("W") && lint_flags.is_empty());
-
- if show_lint_options {
+ if lint_flags.iter().any(|x| x == &~"help") {
describe_warnings();
return;
}