Print violations in realtime if progress with an output file (#4362)

This commit is contained in:
JP Simard
2022-10-13 02:23:24 -04:00
committed by GitHub
parent 4e3c750086
commit de0b91cd5a
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -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)