mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00

Update to the latest golangci-lint version. v1.46 added new linters. I disabled nonamedreturns and exhaustruct since they enforce a certain code style and using them would require big changes to the code base. The nosprintfhostport is new and I fixed one problem in the tests. While the test itself is fine because it uses ipv4 only the linter still looks good because the sprintf use will fail for ipv6 addresses. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
71 lines
1.2 KiB
YAML
71 lines
1.2 KiB
YAML
---
|
|
run:
|
|
concurrency: 6
|
|
deadline: 5m
|
|
skip-dirs-use-default: true
|
|
skip-dirs:
|
|
- contrib
|
|
- dependencies
|
|
skip-files:
|
|
- swagger.go
|
|
modules-download-mode: readonly
|
|
linters:
|
|
enable-all: true
|
|
disable:
|
|
# All these break for one reason or another
|
|
- tagliatelle # too many JSON keys cannot be changed due to compat
|
|
- gocognit
|
|
- testpackage
|
|
- goerr113
|
|
- exhaustivestruct
|
|
- errorlint
|
|
- wrapcheck
|
|
- paralleltest
|
|
- wsl
|
|
- godox
|
|
- tparallel
|
|
- gomnd
|
|
- nlreturn
|
|
- noctx
|
|
- nestif
|
|
- predeclared
|
|
- thelper
|
|
- ifshort
|
|
- forbidigo
|
|
- exhaustive
|
|
- gofumpt
|
|
- gci
|
|
- godot
|
|
- dupl
|
|
- funlen
|
|
- gochecknoglobals
|
|
- gochecknoinits
|
|
- goconst
|
|
- gocyclo
|
|
- lll
|
|
- gosec
|
|
- maligned
|
|
- gomoddirectives
|
|
- containedctx
|
|
- contextcheck
|
|
- cyclop
|
|
- errname
|
|
- forcetypeassert
|
|
- ireturn
|
|
- varnamelen
|
|
- maintidx
|
|
- nilnil
|
|
- nonamedreturns
|
|
- exhaustruct
|
|
# deprecated linters
|
|
- golint # replaced by revive
|
|
- scopelint # replaced by exportloopref
|
|
- interfacer
|
|
linters-settings:
|
|
errcheck:
|
|
check-blank: false
|
|
ignore: fmt:.*
|
|
nolintlint:
|
|
allow-leading-space: false
|
|
require-specific: true
|