Skip to content

Commit e985a1d

Browse files
committed
chore: update implementation
1 parent b699982 commit e985a1d

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

pkg/golinters/gochecknoglobals/gochecknoglobals.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,10 @@ import (
1010
func New() *goanalysis.Linter {
1111
a := checknoglobals.Analyzer()
1212

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 `--exclude-files`.
16-
linterConfig := map[string]map[string]any{
17-
a.Name: {"t": true},
18-
}
19-
2013
return goanalysis.NewLinter(
2114
a.Name,
2215
"Check that no global variables exist.",
2316
[]*analysis.Analyzer{a},
24-
linterConfig,
17+
nil,
2518
).WithLoadMode(goanalysis.LoadModeTypesInfo)
2619
}

0 commit comments

Comments
 (0)