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 {
255255 WithURL ("https://github.com/tommy-muehle/go-mnd" ),
256256 linter .NewConfig (golinters .NewGoerr113 ()).
257257 WithPresets (linter .PresetStyle ).
258+ WithLoadForGoAnalysis ().
258259 WithURL ("https://github.com/Djarvur/go-err113" ),
259260 linter .NewConfig (golinters .NewGomodguard ()).
260261 WithPresets (linter .PresetStyle ).
Original file line number Diff line number Diff line change 11//args: -Egoerr113
22package testdata
33
4+ import "os"
5+
46func SimpleEqual (e1 , e2 error ) bool {
57 return e1 == e2 // ERROR `err113: do not compare errors directly, use errors.Is() instead: "e1 == e2"`
68}
79
810func SimpleNotEqual (e1 , e2 error ) bool {
911 return e1 != e2 // ERROR `err113: do not compare errors directly, use errors.Is() instead: "e1 != e2"`
1012}
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