File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -8,22 +8,19 @@ import (
8
8
)
9
9
10
10
func NewGochecknoglobals () * goanalysis.Linter {
11
- gochecknoglobals := checknoglobals .Analyzer ()
11
+ a := checknoglobals .Analyzer ()
12
12
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`.
17
16
linterConfig := map [string ]map [string ]any {
18
- gochecknoglobals .Name : {
19
- "t" : true ,
20
- },
17
+ a .Name : {"t" : true },
21
18
}
22
19
23
20
return goanalysis .NewLinter (
24
- gochecknoglobals .Name ,
25
- gochecknoglobals .Doc ,
26
- []* analysis.Analyzer {gochecknoglobals },
21
+ a .Name ,
22
+ a .Doc ,
23
+ []* analysis.Analyzer {a },
27
24
linterConfig ,
28
25
).WithLoadMode (goanalysis .LoadModeTypesInfo )
29
26
}
You can’t perform that action at this time.
0 commit comments