diff --git a/go.mod b/go.mod index 3ff6c71f9f10..845d086063cb 100644 --- a/go.mod +++ b/go.mod @@ -30,7 +30,7 @@ require ( github.com/fatih/color v1.15.0 github.com/firefart/nonamedreturns v1.0.4 github.com/fzipp/gocyclo v0.6.0 - github.com/go-critic/go-critic v0.6.7 + github.com/go-critic/go-critic v0.7.0 github.com/go-xmlfmt/xmlfmt v1.1.2 github.com/gofrs/flock v0.8.1 github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 @@ -161,7 +161,7 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/quasilyte/go-ruleguard v0.3.19 // indirect github.com/quasilyte/gogrep v0.5.0 // indirect - github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect github.com/sivchari/nosnakecase v1.7.0 github.com/spf13/afero v1.8.2 // indirect diff --git a/go.sum b/go.sum index 3c83e50a551e..388458cd63a8 100644 --- a/go.sum +++ b/go.sum @@ -136,8 +136,8 @@ github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwV github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fzipp/gocyclo v0.6.0 h1:lsblElZG7d3ALtGMx9fmxeTKZaLLpU8mET09yN4BBLo= github.com/fzipp/gocyclo v0.6.0/go.mod h1:rXPyn8fnlpa0R2csP/31uerbiVBugk5whMdlyaLkLoA= -github.com/go-critic/go-critic v0.6.7 h1:1evPrElnLQ2LZtJfmNDzlieDhjnq36SLgNzisx06oPM= -github.com/go-critic/go-critic v0.6.7/go.mod h1:fYZUijFdcnxgx6wPjQA2QEjIRaNCT0gO8bhexy6/QmE= +github.com/go-critic/go-critic v0.7.0 h1:tqbKzB8pqi0NsRZ+1pyU4aweAF7A7QN0Pi4Q02+rYnQ= +github.com/go-critic/go-critic v0.7.0/go.mod h1:moYzd7GdVXE2C2hYTwd7h0CPcqlUeclsyBRwMa38v64= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -162,7 +162,7 @@ github.com/go-toolsmith/astfmt v1.1.0 h1:iJVPDPp6/7AaeLJEruMsBUlOYCmvg0MoCfJprsO github.com/go-toolsmith/astfmt v1.1.0/go.mod h1:OrcLlRwu0CuiIBp/8b5PYF9ktGVZUjlNMV634mhwuQ4= github.com/go-toolsmith/astp v1.1.0 h1:dXPuCl6u2llURjdPLLDxJeZInAeZ0/eZwFJmqZMnpQA= github.com/go-toolsmith/astp v1.1.0/go.mod h1:0T1xFGz9hicKs8Z5MfAqSUitoUYS30pDMsRVIDHs8CA= -github.com/go-toolsmith/pkgload v1.0.2-0.20220101231613-e814995d17c5 h1:eD9POs68PHkwrx7hAB78z1cb6PfGq/jyWn3wJywsH1o= +github.com/go-toolsmith/pkgload v1.2.2 h1:0CtmHq/02QhxcF7E9N5LIFcYFsMR5rdovfqTtRKkgIk= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/strparse v1.1.0 h1:GAioeZUK9TGxnLS+qfdqNbA4z0SSm5zVNtCQiyP2Bvw= github.com/go-toolsmith/strparse v1.1.0/go.mod h1:7ksGy58fsaQkGQlY8WVoBFNyEPMGuJin1rfoPS4lBSQ= @@ -441,8 +441,8 @@ github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo= github.com/quasilyte/gogrep v0.5.0/go.mod h1:Cm9lpz9NZjEoL1tgZ2OgeUKPIxL1meE7eo60Z6Sk+Ng= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY= -github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= +github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= diff --git a/pkg/golinters/gocritic.go b/pkg/golinters/gocritic.go index ed9681a308bf..2e241b5a1862 100644 --- a/pkg/golinters/gocritic.go +++ b/pkg/golinters/gocritic.go @@ -13,7 +13,7 @@ import ( "sync" "github.com/go-critic/go-critic/checkers" - gocriticlinter "github.com/go-critic/go-critic/framework/linter" + gocriticlinter "github.com/go-critic/go-critic/linter" "golang.org/x/tools/go/analysis" "github.com/golangci/golangci-lint/pkg/config" diff --git a/test/bench/bench_test.go b/test/bench/bench_test.go index c96d14a37453..a6ef3fe2184e 100644 --- a/test/bench/bench_test.go +++ b/test/bench/bench_test.go @@ -20,18 +20,18 @@ import ( "github.com/golangci/golangci-lint/test/testshared" ) -func chdir(b *testing.B, dir string) { +func chdir(b testing.TB, dir string) { if err := os.Chdir(dir); err != nil { b.Fatalf("can't chdir to %s: %s", dir, err) } } -func prepareGoSource(b *testing.B) { +func prepareGoSource(b testing.TB) { chdir(b, filepath.Join(build.Default.GOROOT, "src")) } -func prepareGithubProject(owner, name string) func(*testing.B) { - return func(b *testing.B) { +func prepareGithubProject(owner, name string) func(testing.TB) { + return func(b testing.TB) { dir := filepath.Join(build.Default.GOPATH, "src", "github.com", owner, name) _, err := os.Stat(dir) if os.IsNotExist(err) { @@ -79,7 +79,7 @@ func getGolangciLintCommonArgs() []string { return []string{"run", "--no-config", "--issues-exit-code=0", "--deadline=30m", "--disable-all", "--enable=govet"} } -func runGolangciLintForBench(b *testing.B) { +func runGolangciLintForBench(b testing.TB) { args := getGolangciLintCommonArgs() args = append(args, getBenchLintersArgs()...) printCommand("golangci-lint", args...) @@ -180,7 +180,7 @@ type runResult struct { duration time.Duration } -func runOne(b *testing.B, run func(*testing.B), progName string) *runResult { +func runOne(b *testing.B, run func(testing.TB), progName string) *runResult { doneCh := make(chan struct{}) peakMemCh := trackPeakMemoryUsage(b, doneCh, progName) startedAt := time.Now() @@ -200,7 +200,7 @@ func BenchmarkGolangciLint(b *testing.B) { type bcase struct { name string - prepare func(*testing.B) + prepare func(testing.TB) } bcases := []bcase{ {