Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compare version #80

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions v2/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/gostaticanalysis/skeletonkit v0.4.0 h1:dHR48OSGfrbA6G36W5wd6TuY6w6Gooi4hRrvxa5uH9o=
github.com/gostaticanalysis/skeletonkit v0.4.0/go.mod h1:UcRLvBDmeN7krfn6gM2W58XEA5IzjHxtX1NLGR3p2CM=
github.com/gostaticanalysis/skeletonkit v0.4.1 h1:22ImX8zqtjDGfvQZYwJvtVR6ff6JwG4jQLIigZGpNto=
github.com/gostaticanalysis/skeletonkit v0.4.1/go.mod h1:ep5WlFfwr3pi3erF3rcpyobHmyle9aLLbKCAacBRGc4=
github.com/josharian/mapfs v0.0.0-20210615234106-095c008854e6 h1:c+ctPFdISggaSNCfU1IueNBAsqetJSvMcpQlT+0OVdY=
Expand All @@ -15,17 +13,13 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
Expand All @@ -37,8 +31,6 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ=
golang.org/x/tools v0.26.0/go.mod h1:TPVVj70c7JJ3WCazhD8OdXcZg/og+b9+tH/KxylGwH0=
golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o=
golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
Expand Down
34 changes: 19 additions & 15 deletions v2/skeleton/skeleton_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"errors"
"flag"
"io"
"os"
"os/exec"
"path"
Expand All @@ -12,9 +13,10 @@ import (
"strings"
"testing"

"github.com/tenntenn/golden"

"github.com/gostaticanalysis/skeleton/v2/skeleton"
"github.com/gostaticanalysis/skeleton/v2/skeleton/internal/gomod"
"github.com/tenntenn/golden"
)

var (
Expand Down Expand Up @@ -117,7 +119,7 @@ func TestSkeletonRun(t *testing.T) {
if tt.wantGoTest && tt.path != "" {
skeletondir := filepath.Join(s.Dir, path.Base(tt.path))
modroot := modroot(t, skeletondir)
gomodtidy(t, modroot)
execCmd(t, modroot, "go", "mod", "tidy")
gotest(t, name, skeletondir)
}

Expand All @@ -143,30 +145,18 @@ func modroot(t *testing.T, dir string) string {
return filepath.Dir(modfile)
}

func gomodtidy(t *testing.T, dir string) {
t.Helper()
cmd := exec.Command("go", "mod", "tidy")
cmd.Dir = dir
var stderr bytes.Buffer
cmd.Stderr = &stderr
if err := cmd.Run(); err != nil {
t.Fatalf("go mod tidy: unexpected error: %s with:\n%s", err, &stderr)
}
}

var (
timeRegexp = regexp.MustCompile(`([\(\t])([0-9.]+s)(\)?)`)
)

func gotest(t *testing.T, name, dir string) {
t.Helper()

var stdout, stderr bytes.Buffer
cmd := exec.Command("go", "test")
cmd.Dir = dir
cmd.Stdout = &stdout
cmd.Stderr = &stderr
t.Log("exec", cmd)

if err := cmd.Run(); err != nil && !errors.As(err, new(*exec.ExitError)) {
t.Fatal("unexpected error:", err)
}
Expand All @@ -184,3 +174,17 @@ func gotest(t *testing.T, name, dir string) {
t.Error(diff)
}
}

func execCmd(t *testing.T, dir, cmd string, args ...string) io.Reader {
t.Helper()
var stdout, stderr bytes.Buffer
_cmd := exec.Command(cmd, args...)
_cmd.Stdout = &stdout
_cmd.Stderr = &stderr
_cmd.Dir = dir
t.Log("exec", cmd, strings.Join(args, " "))
if err := _cmd.Run(); err != nil {
t.Fatal(err, "\n", &stderr)
}
return &stdout
}
4 changes: 2 additions & 2 deletions v2/skeleton/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package skeleton

import (
"embed"
"go/version"
"path"
"text/template"

"github.com/gostaticanalysis/skeletonkit"
"golang.org/x/mod/semver"
)

//go:embed _template/*
Expand Down Expand Up @@ -34,5 +34,5 @@ func parseTemplate(info *Info) (*template.Template, error) {
}

func go118(v string) bool {
return v != "" && semver.Compare("v"+v, "v1.18") >= 0
return v != "" && version.Compare(v, "1.18") >= 0
}
12 changes: 6 additions & 6 deletions v2/skeleton/testdata/kind-codegen.golden
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ func (db) Get(id string) int { return 0 }
func (db) Set(id string, v int) {}

type Logger interface {
Infof(format string, args ...interface{})
Errorf(format string, args ...interface{})
Infof(format string, args ...any)
Errorf(format string, args ...any)
}
-- example/testdata/src/a/example.golden --
// Code generated by example; DO NOT EDIT.
Expand All @@ -188,15 +188,15 @@ func (m *MockDB) Set(id string, v int) {
}

type MockLogger struct {
ErrorfFunc func(format string, args ...interface{})
InfofFunc func(format string, args ...interface{})
ErrorfFunc func(format string, args ...any)
InfofFunc func(format string, args ...any)
}

func (m *MockLogger) Errorf(format string, args ...interface{}) {
func (m *MockLogger) Errorf(format string, args ...any) {
m.ErrorfFunc(format, args...)
}

func (m *MockLogger) Infof(format string, args ...interface{}) {
func (m *MockLogger) Infof(format string, args ...any) {
m.InfofFunc(format, args...)
}
-- example/testdata/src/a/go.mod --
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/kind-inspect-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example.com/example 0000s
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/kind-inspect-go118-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example.com/example 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/kind-inspect.golden
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/kind-ssa-go-test.golden
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ a.f
*ssa.Const 0:int
*ssa.Return return
--- FAIL: TestAnalyzer (0000s)
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `identifier is gopher`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
analysistest.go:614: a/a.go:7: no diagnostic was reported matching `identifier is gopher`
FAIL
exit status 1
FAIL example.com/example 0000s
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/kind-ssa-go118-go-test.golden
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ a.f
*ssa.Const 0:int
*ssa.Return return
--- FAIL: TestAnalyzer (0000s)
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `identifier is gopher`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
analysistest.go:614: a/a.go:7: no diagnostic was reported matching `identifier is gopher`
FAIL
exit status 1
FAIL example.com/example 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/kind-ssa.golden
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
s := pass.ResultOf[buildssa.Analyzer].(*buildssa.SSA)
for _, f := range s.SrcFuncs {
fmt.Println(f)
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/nocmd-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example.com/example 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/nocmd.golden
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/nooption-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example.com/example 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/nooption.golden
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/onlypkgname-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/onlypkgname.golden
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/overwrite-cancel.golden
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/overwrite-confirm-no.golden
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/overwrite-confirm-yes-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example.com/example 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/overwrite-confirm-yes.golden
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/overwrite-force-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example.com/example 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/overwrite-force.golden
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/overwrite-newonly.golden
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/parent-module-deep-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example.com/example/sub/subsub 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/parent-module-deep.golden
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/parent-module-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example.com/example/sub 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/parent-module.golden
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
4 changes: 2 additions & 2 deletions v2/skeleton/testdata/plugin-go-test.golden
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- FAIL: TestAnalyzer (0000s)
analysistest.go:550: a/a.go:5:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:5: no diagnostic was reported matching `pattern`
analysistest.go:550: a/a.go:6: diagnostic "identifier is gopher" does not match pattern `pattern`
analysistest.go:614: a/a.go:6: no diagnostic was reported matching `pattern`
FAIL
exit status 1
FAIL example.com/example 0000s
2 changes: 1 addition & 1 deletion v2/skeleton/testdata/plugin.golden
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var Analyzer = &analysis.Analyzer{
},
}

func run(pass *analysis.Pass) (interface{}, error) {
func run(pass *analysis.Pass) (any, error) {
inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)

nodeFilter := []ast.Node{
Expand Down
Loading