File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -255,6 +255,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
255
255
WithURL ("https://github.com/tommy-muehle/go-mnd" ),
256
256
linter .NewConfig (golinters .NewGoerr113 ()).
257
257
WithPresets (linter .PresetStyle ).
258
+ WithLoadForGoAnalysis ().
258
259
WithURL ("https://github.com/Djarvur/go-err113" ),
259
260
linter .NewConfig (golinters .NewGomodguard ()).
260
261
WithPresets (linter .PresetStyle ).
Original file line number Diff line number Diff line change 1
1
//args: -Egoerr113
2
2
package testdata
3
3
4
+ import "os"
5
+
4
6
func SimpleEqual (e1 , e2 error ) bool {
5
7
return e1 == e2 // ERROR `err113: do not compare errors directly, use errors.Is() instead: "e1 == e2"`
6
8
}
7
9
8
10
func SimpleNotEqual (e1 , e2 error ) bool {
9
11
return e1 != e2 // ERROR `err113: do not compare errors directly, use errors.Is() instead: "e1 != e2"`
10
12
}
13
+
14
+ func CheckGoerr13Import (e error ) bool {
15
+ f , err := os .Create ("f.txt" )
16
+ if err != nil {
17
+ return err == e // ERROR `err113: do not compare errors directly, use errors.Is() instead: "err == e"`
18
+ }
19
+ f .Close ()
20
+ return false
21
+ }
You can’t perform that action at this time.
0 commit comments