diff --git a/processor.go b/processor.go index 4742e6b..0324e7a 100644 --- a/processor.go +++ b/processor.go @@ -102,6 +102,10 @@ func (c *processor) process(n ast.Node) (*Result, error) { } } + if len(paramTypes) != len(x.Args) { + return &Result{}, nil + } + for i, arg := range x.Args { a, ok := arg.(*ast.SelectorExpr) if !ok { diff --git a/testdata/proto/tassert.go b/testdata/proto/tassert.go new file mode 100644 index 0000000..ffe7899 --- /dev/null +++ b/testdata/proto/tassert.go @@ -0,0 +1,12 @@ +package proto + +import ( + "net/http" + "testing" +) + +func _(tb testing.TB, client *http.Client, req *http.Request, statusCode int) { + Errorf(tb, false, "expected %v status code, got %v %v", statusCode, req.URL, client.Transport) +} + +func Errorf(tb testing.TB, cond bool, format string, args ...any) {}