Skip to content

Commit 3093371

Browse files
committed
review
1 parent c3fe301 commit 3093371

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.golangci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,30 @@ issues:
138138
- gomnd
139139

140140
- path: pkg/golinters/errcheck.go
141+
linters: [staticcheck]
141142
text: "SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead"
142143
- path: pkg/commands/run.go
144+
linters: [staticcheck]
143145
text: "SA1019: lsc.Errcheck.Exclude is deprecated: use ExcludeFunctions instead"
146+
- path: pkg/commands/run.go
147+
linters: [staticcheck]
148+
text: "SA1019: c.cfg.Run.ShowStats is deprecated: use Output.ShowStats instead."
144149

145150
- path: pkg/golinters/gofumpt.go
151+
linters: [staticcheck]
146152
text: "SA1019: settings.LangVersion is deprecated: use the global `run.go` instead."
147153
- path: pkg/golinters/staticcheck_common.go
154+
linters: [staticcheck]
148155
text: "SA1019: settings.GoVersion is deprecated: use the global `run.go` instead."
149156
- path: pkg/lint/lintersdb/manager.go
157+
linters: [staticcheck]
150158
text: "SA1019: (.+).(GoVersion|LangVersion) is deprecated: use the global `run.go` instead."
159+
151160
- path: pkg/golinters/unused.go
161+
linters: [gocritic]
152162
text: "rangeValCopy: each iteration copies 160 bytes \\(consider pointers or indexing\\)"
153163
- path: test/(fix|linters)_test.go
164+
linters: [gocritic]
154165
text: "string `gocritic.go` has 3 occurrences, make it a constant"
155166

156167
run:

pkg/commands/run.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ func (c *runCommand) createPrinter(format string, w io.Writer) (printers.Printer
467467

468468
func (c *runCommand) printStats(issues []result.Issue) {
469469
if c.cfg.Run.ShowStats {
470-
c.log.Warnf("run.show-stats is deprecated, please use output.show-stats")
470+
c.log.Warnf("The configuration option `run.show-stats` is deprecated, please use `output.show-stats`")
471471
}
472472

473473
if !c.cfg.Run.ShowStats && !c.cfg.Output.ShowStats {

pkg/config/run.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ type Run struct {
2323
AllowParallelRunners bool `mapstructure:"allow-parallel-runners"`
2424
AllowSerialRunners bool `mapstructure:"allow-serial-runners"`
2525

26-
ShowStats bool `mapstructure:"show-stats"` // Deprecated use Output.ShowStats instead.
26+
// Deprecated: use Output.ShowStats instead.
27+
ShowStats bool `mapstructure:"show-stats"`
2728

2829
// It's obtain by flags and use for the tests and the context loader.
2930
Args []string // Internal needs.

0 commit comments

Comments
 (0)