Skip to content

Commit 5b3a79f

Browse files
committed
Added a check to ensure a blank report isn't added when there are no files in the report
1 parent cd633ae commit 5b3a79f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

coverage.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,11 @@ func (l Parser) processLcov() (Report, error) {
137137
} else {
138138
l.processLcovLine(line, &report, &fileReport)
139139
}
140-
141140
}
142-
// Add last file
143-
report.Files = append(report.Files, fileReport)
141+
if fileReport.Path != "" {
142+
// Add last file
143+
report.Files = append(report.Files, fileReport)
144+
}
144145
return report, nil
145146
}
146147

0 commit comments

Comments
 (0)