Skip to content

Commit

Permalink
build(deps): bump github.com/quasilyte/go-ruleguard from v0.3.19 to v…
Browse files Browse the repository at this point in the history
…0.4.0 (#3999)
  • Loading branch information
ldez authored Aug 10, 2023
1 parent 03b1824 commit ea4481a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 39 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
github.com/quasilyte/go-ruleguard v0.3.19 // indirect
github.com/quasilyte/go-ruleguard v0.4.0 // indirect
github.com/quasilyte/gogrep v0.5.0 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
Expand All @@ -184,7 +184,7 @@ require (
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20230224173230-c95f2b4c22f2 // indirect
golang.org/x/exp/typeparams v0.0.0-20230307190834-24139beb5833 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.11.0 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum

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

14 changes: 0 additions & 14 deletions pkg/golinters/gocritic.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,20 +283,6 @@ func newGoCriticSettingsWrapper(settings *config.GoCriticSettings, logger loguti
allCheckerMap[checkInfo.Name] = checkInfo
}

if settings != nil && config.IsGreaterThanOrEqualGo121(settings.Go) {
var enabledChecks []string
for _, check := range settings.EnabledChecks {
if check == "ruleguard" {
logger.Warnf("%s: check %q is disabled for go1.21 https://github.com/golangci/golangci-lint/issues/3933", goCriticName, "ruleguard")
continue
}

enabledChecks = append(enabledChecks, check)
}

settings.EnabledChecks = enabledChecks
}

return &goCriticSettingsWrapper{
GoCriticSettings: settings,
logger: logger,
Expand Down
12 changes: 0 additions & 12 deletions test/fix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ func TestFix(t *testing.T) {
for _, input := range sources {
input := input

// TODO(ldez): remove this limitation when gocritic/ruleguard will be fixed.
if filepath.Base(input) == "gocritic.go" {
t.Logf("skip gocritic because of a bug with ruleguard")
continue
}

t.Run(filepath.Base(input), func(t *testing.T) {
t.Parallel()

Expand Down Expand Up @@ -88,12 +82,6 @@ func TestFix_pathPrefix(t *testing.T) {
for _, input := range sources {
input := input

// TODO(ldez): remove this limitation when gocritic/ruleguard will be fixed.
if filepath.Base(input) == "gocritic.go" {
t.Logf("skip gocritic because of a bug with ruleguard")
continue
}

t.Run(filepath.Base(input), func(t *testing.T) {
t.Parallel()

Expand Down
7 changes: 0 additions & 7 deletions test/linters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,6 @@ func testSourcesFromDir(t *testing.T, dir string) {

for _, source := range sources {
source := source

// TODO(ldez): remove this limitation when gocritic/ruleguard will be fixed.
if filepath.Base(source) == "gocritic.go" {
t.Logf("skip gocritic because of a bug with ruleguard")
continue
}

t.Run(filepath.Base(source), func(subTest *testing.T) {
subTest.Parallel()

Expand Down

0 comments on commit ea4481a

Please sign in to comment.