Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump 4d63.com/gochecknoglobals from 0.2.1 to 0.2.2 #5380

Merged
merged 3 commits into from
Feb 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22.1

require (
4d63.com/gocheckcompilerdirectives v1.2.1
4d63.com/gochecknoglobals v0.2.1
4d63.com/gochecknoglobals v0.2.2
github.com/4meepo/tagalign v1.4.1
github.com/Abirdcfly/dupword v0.1.3
github.com/Antonboom/errname v1.0.0
Expand Down
9 changes: 2 additions & 7 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 1 addition & 8 deletions pkg/golinters/gochecknoglobals/gochecknoglobals.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,10 @@ import (
func New() *goanalysis.Linter {
a := checknoglobals.Analyzer()

// gochecknoglobals only lints test files if the `-t` flag is passed,
// so we pass the `t` flag as true to the analyzer before running it.
// This can be turned off by using the regular golangci-lint flags such as `--tests` or `--exclude-files`.
linterConfig := map[string]map[string]any{
a.Name: {"t": true},
}

return goanalysis.NewLinter(
a.Name,
"Check that no global variables exist.",
[]*analysis.Analyzer{a},
linterConfig,
nil,
).WithLoadMode(goanalysis.LoadModeTypesInfo)
}
Loading