nakedreturn
finds naked returns.
package a
func f() (n int) {
return // want "should not use naked return"
}
fixnakedreturn
command check and fix (remove) naked return.
$ go install github.com/gostaticanalysis/nakedreturn/cmd/fixnakedreturn
$ fixnakedreturn ./...