We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bdc2f96 commit 413bec6Copy full SHA for 413bec6
pkg/golinters/errcheck.go
@@ -66,9 +66,14 @@ func NewErrcheck() *goanalysis.Linter {
66
for i, err := range errcheckIssues.UncheckedErrors {
67
var text string
68
if err.FuncName != "" {
69
+ code := err.SelectorName
70
+ if err.SelectorName == "" {
71
+ code = err.FuncName
72
+ }
73
+
74
text = fmt.Sprintf(
75
"Error return value of %s is not checked",
- formatCode(err.SelectorName, lintCtx.Cfg),
76
+ formatCode(code, lintCtx.Cfg),
77
)
78
} else {
79
text = "Error return value is not checked"
0 commit comments