Skip to content

Commit

Permalink
build(deps): bump github.com/go-critic/go-critic from 0.6.7 to 0.7.0 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed Mar 17, 2023
1 parent 59f1c6e commit e27b129
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions go.sum

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

2 changes: 1 addition & 1 deletion pkg/golinters/gocritic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 7 additions & 7 deletions test/bench/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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...)
Expand Down Expand Up @@ -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()
Expand All @@ -200,7 +200,7 @@ func BenchmarkGolangciLint(b *testing.B) {

type bcase struct {
name string
prepare func(*testing.B)
prepare func(testing.TB)
}
bcases := []bcase{
{
Expand Down

0 comments on commit e27b129

Please sign in to comment.