Skip to content

Commit

Permalink
Merge pull request #21 from commentcov/fix_report_output_to_csv
Browse files Browse the repository at this point in the history
feat: make report output csv
  • Loading branch information
terakoya76 authored Jun 23, 2022
2 parents 0cb4fb4 + 8f60cea commit 6ca1e58
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func byFile(items []*proto.CoverageItem) {

for _, file := range files {
percent := sc[file].CalcRate()
fmt.Printf("%v: %v\n", file, percent)
fmt.Printf("%v,,%v\n", file, percent)
}
}

Expand All @@ -89,7 +89,7 @@ func byScope(items []*proto.CoverageItem) {

for _, scope := range scopes {
percent := sc[scope].CalcRate()
fmt.Printf("%v: %v\n", scope, percent)
fmt.Printf(",%v,%v\n", scope, percent)
}
}

Expand All @@ -101,7 +101,7 @@ func byFileScope(items []*proto.CoverageItem) {
for _, scope := range scopes {
if counter, ok := cc[file][scope]; ok {
percent := counter.CalcRate()
fmt.Printf("%v,%v: %v\n", file, scope, percent)
fmt.Printf("%v,%v,%v\n", file, scope, percent)
}
}
}
Expand Down

0 comments on commit 6ca1e58

Please sign in to comment.