File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,9 @@ func (w lintErrorStrings) match(expr *ast.CallExpr) bool {
105
105
}
106
106
// retrieve the package
107
107
id , ok := sel .X .(* ast.Ident )
108
+ if ! ok {
109
+ return false
110
+ }
108
111
functions , ok := w .errorFunctions [id .Name ]
109
112
if ! ok {
110
113
return false
Original file line number Diff line number Diff line change @@ -16,5 +16,9 @@ func g(x int) error {
16
16
err = fmt .Errorf ("Newlines are really fun\n " ) // MATCH /error strings should not be capitalized or end with punctuation or a newline/
17
17
err = errors .New (`too much stuff.` ) // MATCH /error strings should not be capitalized or end with punctuation or a newline/
18
18
err = errors .New ("This %d is too low" , x ) // MATCH /error strings should not be capitalized or end with punctuation or a newline/
19
+
20
+ // Non-regression test for issue #610
21
+ d .stack .Push (from )
22
+
19
23
return err
20
24
}
You can’t perform that action at this time.
0 commit comments