From e27b129e747fe7564e91b6734225b58558dd6135 Mon Sep 17 00:00:00 2001 From: Oleg Kovalov Date: Fri, 17 Mar 2023 17:33:56 +0100 Subject: [PATCH] build(deps): bump github.com/go-critic/go-critic from 0.6.7 to 0.7.0 (#3701) --- go.mod | 4 ++-- go.sum | 10 +++++----- pkg/golinters/gocritic.go | 2 +- test/bench/bench_test.go | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) 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{ {