Skip to content

Commit a9e3197

Browse files
committed
dashboard/app: email regressions in files only
The lines about folders don't look actionable.
1 parent d6b2ee5 commit a9e3197

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

dashboard/app/reporting_email.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,10 @@ func coverageTable(ctx context.Context, ns string, fromTo []coveragedb.TimePerio
208208
FilterMinCoveredLinesDrop: minDrop,
209209
})
210210
res := "Blocks diff,\tPath\n"
211-
templData.Root.Visit(func(path string, summary int64) {
212-
res += fmt.Sprintf("% 11d\t%s\n", summary, path)
211+
templData.Root.Visit(func(path string, summary int64, isDir bool) {
212+
if !isDir {
213+
res += fmt.Sprintf("% 11d\t%s\n", summary, path)
214+
}
213215
})
214216
return res, nil
215217
}

dashboard/app/reporting_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,6 @@ func TestCoverageRegression(t *testing.T) {
14131413
Web version: `+wantLink+`
14141414
14151415
Blocks diff, Path
1416-
-100
14171416
-100 /file_name.c
14181417
14191418
`, msg.Body)

pkg/cover/heatmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ func (thm *templateHeatmapRow) prepareDataFor(pageColumns []pageColumnTarget) {
145145
}
146146
}
147147

148-
func (thm *templateHeatmapRow) Visit(v func(string, int64), path ...string) {
148+
func (thm *templateHeatmapRow) Visit(v func(string, int64, bool), path ...string) {
149149
curPath := append(path, thm.Name)
150-
v(strings.Join(curPath, "/"), thm.Summary)
150+
v(strings.Join(curPath, "/"), thm.Summary, thm.IsDir)
151151
for _, item := range thm.Items {
152152
item.Visit(v, curPath...)
153153
}

0 commit comments

Comments
 (0)