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

Many dependencies started using go 1.22 which means we have to follow in order to update. Disable the now depracted exportloopref linter as it was replaced by copyloopvar as go fixed the loop copy problem in 1.22[1] Another new chnage in go 1.22 is the for loop syntax over ints, the intrange linter chacks for this but there a lot of loops that have to be converted so I didn't do it here and disable th elinter for now, th eold syntax is still fine. [1] https://go.dev/blog/loopvar-preview Signed-off-by: Paul Holzinger <pholzing@redhat.com>
93 lines
2.0 KiB
YAML
93 lines
2.0 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
|
|
- gomnd
|
|
- 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
|
|
- execinquery
|
|
- exportloopref
|
|
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
|