Skip to content

Commit b740afc

Browse files
committed
clean code base.
1 parent 6ee59e5 commit b740afc

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

.golangci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ linters:
7373
- dogsled
7474
- dupl
7575
- errcheck
76+
- exportloopref
7677
- exhaustive
7778
- funlen
7879
- gochecknoinits
@@ -94,7 +95,6 @@ linters:
9495
- noctx
9596
- nolintlint
9697
- rowserrcheck
97-
- scopelint
9898
- staticcheck
9999
- structcheck
100100
- stylecheck
@@ -107,6 +107,7 @@ linters:
107107

108108
# don't enable:
109109
# - asciicheck
110+
# - scopelint
110111
# - gochecknoglobals
111112
# - gocognit
112113
# - godot

go.sum

-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/golinters/gofmt_common.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ func (p *hunkChangesParser) parse(h *diffpkg.Hunk) []Change {
176176
for i := 0; i < len(p.lines); {
177177
line := p.lines[i]
178178
if line.typ == diffLineOriginal {
179-
p.handleOriginalLine(line, &i) //nolint:scopelint
179+
p.handleOriginalLine(line, &i)
180180
continue
181181
}
182182

pkg/result/processors/fixer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (f Fixer) Process(issues []result.Issue) []result.Issue {
5757
for file, issuesToFix := range issuesToFixPerFile {
5858
var err error
5959
f.sw.TrackStage("all", func() {
60-
err = f.fixIssuesInFile(file, issuesToFix) //nolint:scopelint
60+
err = f.fixIssuesInFile(file, issuesToFix)
6161
})
6262
if err != nil {
6363
f.log.Errorf("Failed to fix issues in file %s: %s", file, err)

pkg/result/processors/path_prefixer_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ func TestPathPrefixer_Process(t *testing.T) {
2727
t.Run(tt.name, func(t *testing.T) {
2828
r := require.New(t)
2929

30-
p := NewPathPrefixer(tt.prefix) //nolint:scopelint
31-
got, err := p.Process(tt.issues) //nolint:scopelint
30+
p := NewPathPrefixer(tt.prefix)
31+
got, err := p.Process(tt.issues)
3232
r.NoError(err, "prefixer should never error")
3333

34-
r.Equal(got, tt.want) //nolint:scopelint
34+
r.Equal(got, tt.want)
3535
})
3636
}
3737
}

test/run_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ func TestPathPrefix(t *testing.T) {
337337
} {
338338
t.Run(tt.Name, func(t *testing.T) {
339339
testshared.NewLintRunner(t).Run(
340-
append(tt.Args, getTestDataDir("withtests"))..., //nolint:scopelint
340+
append(tt.Args, getTestDataDir("withtests"))...,
341341
).ExpectOutputRegexp(
342-
tt.Pattern, //nolint:scopelint
342+
tt.Pattern,
343343
)
344344
})
345345
}

test/testdata/scopelint.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//args: -Escopelint
1+
//args: -Escopelint --internal-cmd-test
22
package testdata
33

44
import "fmt"

0 commit comments

Comments
 (0)