From c15e27166dfb8ef1c94cd8c87ab41edb4e98300f Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Thu, 25 May 2023 19:00:26 +0200 Subject: checkFunctions: Keep `continue` in return value loop Looks like the return value type is always an `*ast.Ident`. Use `continue` instead of `return true` to be more tolerant of unexpected values. --- defererr.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'defererr.go') diff --git a/defererr.go b/defererr.go index 126f824..96c5569 100644 --- a/defererr.go +++ b/defererr.go @@ -81,9 +81,6 @@ func checkFunctions(pass *analysis.Pass, node ast.Node) { for i, returnVal := range funcDecl.Type.Results.List { returnIdent, ok := returnVal.Type.(*ast.Ident) if !ok { - // TODO: Do we need to `return true` here? Does this check - // mean that variables are not declared in the return - // signature? continue } -- cgit v1.2.3