diff --git a/cmd/partitiontest_linter/go.mod b/cmd/partitiontest_linter/go.mod index e389a33216..57f9fbb1fc 100644 --- a/cmd/partitiontest_linter/go.mod +++ b/cmd/partitiontest_linter/go.mod @@ -6,4 +6,4 @@ require golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect require golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect -require golang.org/x/tools v0.1.3 +require golang.org/x/tools v0.1.12 diff --git a/cmd/partitiontest_linter/linter.go b/cmd/partitiontest_linter/linter.go index 220eac3dc7..50c1298a09 100644 --- a/cmd/partitiontest_linter/linter.go +++ b/cmd/partitiontest_linter/linter.go @@ -124,7 +124,7 @@ func doesParameterNameMatch(call *ast.CallExpr, fn *ast.FuncDecl) bool { for _, oneArg := range call.Args { if realArg, ok := oneArg.(*ast.Ident); ok { - if realArg.Obj.Name == fn.Type.Params.List[0].Names[0].Obj.Name { + if realArg != nil && realArg.Obj != nil && realArg.Obj.Name == fn.Type.Params.List[0].Names[0].Obj.Name { return true } }