Skip to content

Commit

Permalink
build(deps): bump github.com/go-critic/go-critic from 0.6.5 to 0.6.6 (g…
Browse files Browse the repository at this point in the history
…olangci#3616)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
2 people authored and SeigeC committed Apr 4, 2023
1 parent 5017ce4 commit ff18a65
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 37 deletions.
16 changes: 8 additions & 8 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.14.1
github.com/firefart/nonamedreturns v1.0.4
github.com/fzipp/gocyclo v0.6.0
github.com/go-critic/go-critic v0.6.5
github.com/go-critic/go-critic v0.6.6
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 @@ -128,13 +128,13 @@ require (
github.com/fatih/structtag v1.2.0 // indirect
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-toolsmith/astcast v1.0.0 // indirect
github.com/go-toolsmith/astcast v1.1.0 // indirect
github.com/go-toolsmith/astcopy v1.0.3 // indirect
github.com/go-toolsmith/astequal v1.0.3 // indirect
github.com/go-toolsmith/astfmt v1.0.0 // indirect
github.com/go-toolsmith/astp v1.0.0 // indirect
github.com/go-toolsmith/strparse v1.0.0 // indirect
github.com/go-toolsmith/typep v1.0.2 // indirect
github.com/go-toolsmith/astequal v1.1.0 // indirect
github.com/go-toolsmith/astfmt v1.1.0 // indirect
github.com/go-toolsmith/astp v1.1.0 // indirect
github.com/go-toolsmith/strparse v1.1.0 // indirect
github.com/go-toolsmith/typep v1.1.0 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
Expand Down Expand Up @@ -179,7 +179,7 @@ require (
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/exp/typeparams v0.0.0-20221208152030-732eee02a75a // indirect
golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
Expand Down
43 changes: 16 additions & 27 deletions go.sum

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

4 changes: 2 additions & 2 deletions pkg/golinters/gocritic.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func runGocriticOnFile(linterCtx *gocriticlinter.Context, f *ast.File, checks []
// All checkers are expected to use *lint.Context
// as read-only structure, so no copying is required.
for _, warn := range c.Check(f) {
pos := linterCtx.FileSet.Position(warn.Node.Pos())
pos := linterCtx.FileSet.Position(warn.Pos)
issue := result.Issue{
Pos: pos,
Text: fmt.Sprintf("%s: %s", c.Info.Name, warn.Text),
Expand All @@ -184,7 +184,7 @@ func runGocriticOnFile(linterCtx *gocriticlinter.Context, f *ast.File, checks []
issue.Replacement = &result.Replacement{
Inline: &result.InlineFix{
StartCol: pos.Column - 1,
Length: int(warn.Node.End() - warn.Node.Pos()),
Length: int(warn.Suggestion.To - warn.Suggestion.From),
NewString: string(warn.Suggestion.Replacement),
},
}
Expand Down

0 comments on commit ff18a65

Please sign in to comment.