mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-05 00:15:44 +00:00
.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:
parent
7f7b35356f
commit
730934bd86
1 changed files with 12 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue