Skip to content

Commit 5741436

Browse files
committed
chore(offtopic): rename a variable inside NewGochecknoglobals
1 parent 1aaf889 commit 5741436

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

pkg/golinters/gochecknoglobals.go

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,19 @@ import (
88
)
99

1010
func NewGochecknoglobals() *goanalysis.Linter {
11-
gochecknoglobals := checknoglobals.Analyzer()
11+
a := checknoglobals.Analyzer()
1212

13-
// gochecknoglobals only lints test files if the `-t` flag is passed, so we
14-
// pass the `t` flag as true to the analyzer before running it. This can be
15-
// turned off by using the regular golangci-lint flags such as `--tests` or
16-
// `--skip-files`.
13+
// gochecknoglobals only lints test files if the `-t` flag is passed,
14+
// so we pass the `t` flag as true to the analyzer before running it.
15+
// This can be turned off by using the regular golangci-lint flags such as `--tests` or `--skip-files`.
1716
linterConfig := map[string]map[string]any{
18-
gochecknoglobals.Name: {
19-
"t": true,
20-
},
17+
a.Name: {"t": true},
2118
}
2219

2320
return goanalysis.NewLinter(
24-
gochecknoglobals.Name,
25-
gochecknoglobals.Doc,
26-
[]*analysis.Analyzer{gochecknoglobals},
21+
a.Name,
22+
a.Doc,
23+
[]*analysis.Analyzer{a},
2724
linterConfig,
2825
).WithLoadMode(goanalysis.LoadModeTypesInfo)
2926
}

0 commit comments

Comments
 (0)