Skip to content

Commit 1239770

Browse files
committed
lint fix
1 parent 33315c3 commit 1239770

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

pkg/testcoverage/check_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ func Test_Analyze(t *testing.T) {
563563
result := Analyze(cfg, stats, stats)
564564
assert.Empty(t, result.Diff)
565565
assert.True(t, result.Pass())
566-
assert.Equal(t, 0.0, result.DiffPercentage)
566+
assert.Equal(t, 0.0, result.DiffPercentage) //nolint:testifylint //relax
567567
})
568568

569569
t.Run("diff below threshold", func(t *testing.T) {
@@ -579,7 +579,7 @@ func Test_Analyze(t *testing.T) {
579579
assert.NotEmpty(t, result.Diff)
580580
assert.False(t, result.Pass())
581581
assert.False(t, result.MeetsDiffThreshold())
582-
assert.Equal(t, 70.0, result.DiffPercentage)
582+
assert.Equal(t, 70.0, result.DiffPercentage) //nolint:testifylint //relax
583583
})
584584

585585
t.Run("diff above threshold", func(t *testing.T) {
@@ -595,7 +595,7 @@ func Test_Analyze(t *testing.T) {
595595
assert.NotEmpty(t, result.Diff)
596596
assert.True(t, result.Pass())
597597
assert.True(t, result.MeetsDiffThreshold())
598-
assert.Equal(t, 70.0, result.DiffPercentage)
598+
assert.Equal(t, 70.0, result.DiffPercentage) //nolint:testifylint //relax
599599
})
600600

601601
t.Run("diff above threshold (small diff)", func(t *testing.T) {
@@ -610,7 +610,7 @@ func Test_Analyze(t *testing.T) {
610610
result := Analyze(cfg, stats, base)
611611
assert.True(t, result.Pass())
612612
assert.True(t, result.MeetsDiffThreshold())
613-
assert.Equal(t, 0.01, result.DiffPercentage)
613+
assert.Equal(t, 0.01, result.DiffPercentage) //nolint:testifylint //relax
614614
})
615615
}
616616

pkg/testcoverage/report_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ func Test_ReportForHuman(t *testing.T) {
8989
})
9090
}
9191

92+
//nolint:dupl // relax
9293
func Test_ReportForHumanDiff(t *testing.T) {
9394
t.Parallel()
9495

@@ -128,7 +129,7 @@ func Test_ReportForHumanDiff(t *testing.T) {
128129
assert.Contains(t, buf.String(), "foo-new\t 1\t\t88.9% (8/9)\t")
129130
})
130131

131-
t.Run("diff - threshold failed", func(t *testing.T) { //nolit:dupl // relax
132+
t.Run("diff - threshold failed", func(t *testing.T) {
132133
t.Parallel()
133134

134135
base := []coverage.Stats{{Name: "foo", Total: 10, Covered: 1}}

pkg/testcoverage/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,5 +140,5 @@ func TotalPercentageDiff(current, base []coverage.Stats) float64 {
140140
p := cp - bp
141141

142142
// round to %.2f
143-
return float64(int(math.Round(p*100))) / 100
143+
return float64(int(math.Round(p*100))) / 100 //nolint:mnd //relax
144144
}

0 commit comments

Comments
 (0)