spiegel_podman/.golangci.yml
Kir Kolyshkin 1d8caa4ab7
.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>
(cherry picked from commit 730934bd86)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-06-04 19:38:16 +02:00

91 lines
1.9 KiB
YAML

version: "2"
run:
modules-download-mode: readonly
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: disable
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- decorder
- dogsled
- durationcheck
- errchkjson
- exptostd
- fatcontext
- forbidigo
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- goprintffuncname
- grouper
- iface
- inamedparam
- interfacebloat
- makezero
- mirror
- misspell
- nilerr
- nilnesserr
- nolintlint
- nosprintfhostport
- prealloc
- protogetter
- reassign
- recvcheck
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- testableexamples
- unconvert
- unparam
- usestdlibvars
- usetesting
- 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
- -ST1003 # https://staticcheck.dev/docs/checks/#ST1003 Poorly chosen identifier.
- -QF1008 # https://staticcheck.dev/docs/checks/#QF1008 Omit embedded fields from selector expression.
nolintlint:
require-specific: true
revive:
rules:
- name: unused-parameter
exclusions:
generated: strict
presets:
- comments
- std-error-handling
rules:
- linters:
- recvcheck
path: pkg/k8s.io/
issues:
max-issues-per-linter: 0
max-same-issues: 0