.golangci.yml: deny using obsoleted os.Is... checks

They were replaced by errors.Is by the previous commit, and shall not
crawl back in.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin 2026-05-21 13:13:10 -07:00
parent 7f7b35356f
commit 730934bd86

View file

@ -22,6 +22,7 @@ linters:
- errchkjson
- exptostd
- fatcontext
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
@ -54,6 +55,17 @@ linters:
- wastedassign
- whitespace
settings:
forbidigo:
forbid:
# os.Is* error checking functions predate errors.Is. Therefore, they
# only support errors returned by the os package and subtly fail
# to deal with other wrapped error types.
# New code should use errors.Is(err, error-type) instead.
- pattern: ^os\.Is(Exist|NotExist|Permission|Timeout)$
pkg: ^os$
msg: Use errors.Is instead.
analyze-types: true
staticcheck:
checks:
- all