Skip to content

Commit 375fa11

Browse files
authored
dev: close errcheck exclude file (#4649)
1 parent 7ad7949 commit 375fa11

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/golinters/errcheck/errcheck.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ func readExcludeFile(name string) ([]string, error) {
254254
if fh == nil {
255255
return nil, fmt.Errorf("failed reading exclude file: %s: %w", name, err)
256256
}
257+
defer func() { _ = fh.Close() }()
257258

258259
scanner := bufio.NewScanner(fh)
259260

0 commit comments

Comments
 (0)