Files
podman/.golangci.yml
Paul Holzinger 986fc9f465 update golangci-lint to v1.64.2
- exportloopref is deprecated and deactivated so it should be removed
  from the disable list.
- tenv is deprecated and was replaced by usetesting

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2025-02-12 14:01:10 +01:00

96 lines
2.1 KiB
YAML

---
run:
concurrency: 6
timeout: 5m
modules-download-mode: readonly
linters:
enable-all: true
disable:
# too many reports but requires attention
- depguard
- intrange # should be turned on but we have to convert each place manually as there is no auto fix function
- tagalign
- perfsprint
- typecheck
# useful hints that should be addressed
- testifylint # all of reports that should be fixed
- nakedret
- gosmopolitan # usage of time.Local in pkg/k8s.io
- tagliatelle # too many JSON keys cannot be changed due to compat
- dupword # too many false positives (e.g., in tests)
- gocognit
- testpackage
- err113
- errorlint
- wrapcheck
- paralleltest
- wsl
- godox
- tparallel
- nlreturn
- noctx
- nestif
- predeclared
- thelper
- forbidigo
- exhaustive
- gofumpt
- gci
- godot
- dupl
- funlen
- gochecknoglobals
- gochecknoinits
- goconst
- gocyclo
- lll
- gosec
- musttag # way to many warnings to fix for now, also some false positives
- mnd # way to many false positives
- gomoddirectives
- containedctx
- contextcheck
- cyclop
- canonicalheader # our current header values are fixed and should not be changed
- errname
- forcetypeassert
- ireturn
- varnamelen
- maintidx
- nilnil
- nonamedreturns
- exhaustruct
# deprecated linters
- tenv
linters-settings:
errcheck:
check-blank: false
nolintlint:
allow-unused: true
require-specific: true
revive:
rules:
- name: unused-parameter
disabled: true
issues:
# Maximum issues count per one linter.
# Set to 0 to disable.
# Default: 50
max-issues-per-linter: 0
# Maximum count of issues with the same text.
# Set to 0 to disable.
# Default: 3
max-same-issues: 0
exclude-dirs-use-default: true
exclude-dirs:
- contrib
- dependencies
exclude-files:
- swagger.go
exclude-rules:
# Exclude recvcheck from running on the imported k8s files, to much failures
- path: pkg/k8s.io/
linters:
- recvcheck