mirror of
https://github.com/realm/SwiftLint.git
synced 2026-05-07 20:12:49 +00:00
Print violations in realtime if progress with an output file (#4362)
This commit is contained in:
@@ -146,6 +146,9 @@
|
||||
only differ in trivia.
|
||||
[SimplyDanny](https://github.com/SimplyDanny)
|
||||
|
||||
* Print violations in realtime if `--progress` and `--output` are both set.
|
||||
[JP Simard](https://github.com/jpsim)
|
||||
|
||||
#### Bug Fixes
|
||||
|
||||
* Respect `validates_start_with_lowercase` option when linting function names.
|
||||
|
||||
@@ -272,7 +272,7 @@ private class LintOrAnalyzeResultBuilder {
|
||||
}
|
||||
|
||||
func report(violations: [StyleViolation], realtimeCondition: Bool) {
|
||||
if (reporter.isRealtime && !options.progress) == realtimeCondition {
|
||||
if (reporter.isRealtime && (!options.progress || options.output != nil)) == realtimeCondition {
|
||||
let report = reporter.generateReport(violations)
|
||||
if !report.isEmpty {
|
||||
options.writeToOutput(report)
|
||||
|
||||
Reference in New Issue
Block a user