Skip to content

Commit b532023

Browse files
authored
chore: minor improvements (#194)
1 parent 7003e90 commit b532023

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

pkg/testcoverage/badge.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func generateAndSaveBadge(w io.Writer, cfg Config, totalCoverage int) error {
1919
buffer := &bytes.Buffer{}
2020
out := bufio.NewWriter(buffer)
2121

22-
// `out` writer is used as temporall buffer, which will be finally
22+
// `out` writer is used as temporary buffer, which will be finally
2323
// written to `w` in this defer call
2424
defer func() {
2525
out.Flush()

pkg/testcoverage/check.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,10 @@ func Check(wout io.Writer, cfg Config) (bool, error) {
6363
}
6464

6565
if cfg.LocalPrefixDeprecated != "" { // coverage-ignore
66-
reportGHWarning(w, "Deprecated option",
67-
"local-prefix option is deprecated since v2.13.0, you can safely remove setting this option")
66+
//nolint:lll // relax
67+
msg := "`local-prefix` option is deprecated since v2.13.0, you can safely remove setting this option"
68+
logger.L.Warn().Msg(msg)
69+
reportGHWarning(w, "Deprecated option", msg)
6870
}
6971
}
7072

@@ -152,7 +154,7 @@ func loadBaseCoverageBreakdown(cfg Config) ([]coverage.Stats, error) {
152154

153155
stats, err := coverage.StatsDeserialize(data)
154156
if err != nil {
155-
return nil, fmt.Errorf("parsing file failed: %w", err)
157+
return nil, fmt.Errorf("deserializing stats file failed: %w", err)
156158
}
157159

158160
return stats, nil

0 commit comments

Comments
 (0)