Skip to content

Commit db2214f

Browse files
authored
fix: gocritic importshadow checker (#5673)
1 parent 6f6f105 commit db2214f

File tree

7 files changed

+378
-332
lines changed

7 files changed

+378
-332
lines changed

pkg/goformat/runner.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"regexp"
1313
"strings"
1414

15-
"github.com/rogpeppe/go-internal/diff"
15+
rpdiff "github.com/rogpeppe/go-internal/diff"
1616

1717
"github.com/golangci/golangci-lint/v2/pkg/config"
1818
"github.com/golangci/golangci-lint/v2/pkg/fsutils"
@@ -32,11 +32,11 @@ type Runner struct {
3232
exitCode int
3333
}
3434

35-
func NewRunner(log logutils.Log,
35+
func NewRunner(logger logutils.Log,
3636
metaFormatter *goformatters.MetaFormatter, matcher *processors.GeneratedFileMatcher,
3737
opts RunnerOptions) *Runner {
3838
return &Runner{
39-
log: log,
39+
log: logger,
4040
matcher: matcher,
4141
metaFormatter: metaFormatter,
4242
opts: opts,
@@ -128,7 +128,7 @@ func (c *Runner) process(path string, stdout io.Writer, in io.Reader) error {
128128
if c.opts.diff {
129129
newName := filepath.ToSlash(path)
130130
oldName := newName + ".orig"
131-
_, err = stdout.Write(diff.Diff(oldName, input, newName, output))
131+
_, err = stdout.Write(rpdiff.Diff(oldName, input, newName, output))
132132
if err != nil {
133133
return err
134134
}

0 commit comments

Comments
 (0)