core review fixes.

This commit is contained in:
Aaron Crespo
2017-03-21 17:23:29 -04:00
parent fa46ab04d9
commit edd493cf64
+9 -5
View File
@@ -112,10 +112,14 @@ struct LintCommand: CommandProtocol {
return violations
}
return violations.map {
$0.severity == .error ? StyleViolation(ruleDescription: $0.ruleDescription,
severity: .warning,
location: $0.location,
reason: $0.reason) : $0
if $0.severity == .error {
return StyleViolation(ruleDescription: $0.ruleDescription,
severity: .warning,
location: $0.location,
reason: $0.reason)
} else {
return $0
}
}
}
}
@@ -151,7 +155,7 @@ struct LintOptions: OptionsProtocol {
<*> mode <| Option(key: "strict", defaultValue: false,
usage: "fail on warnings")
<*> mode <| Option(key: "lenient", defaultValue: false,
usage: "succeed on errors")
usage: "downgrades serious violations to warnings, and any warning threshold is disabled")
<*> mode <| useScriptInputFilesOption
<*> mode <| Option(key: "benchmark", defaultValue: false,
usage: "save benchmarks to benchmark_files.txt " +