//args: -Enakedret package testdata func NakedretIssue() (a int, b string) { if a > 0 { return } if b == "" { return 0, "0" } // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // len of this function is 31 return // ERROR "naked return in func `NakedretIssue` with 31 lines of code" } func NoNakedretIssue() (a int, b string) { if a > 0 { return } if b == "" { return 0, "0" } // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // ... // len of this function is 30 return }