containerized-data-importer/.golangci.yml
Alex Kalenyuk 1927d7d13e
Use new 1.23.6 builder (#3652)
* Use new 1.23.6 builder

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* Bump linter to 1.60.3 for go 1.23 support

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* Disable linter failures over G115

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* Fix lint issues related to error format formatting

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

* Address remaining lint failures

len is enough/sprintf not really used

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>

---------

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2025-03-03 14:51:29 +01:00

57 lines
1.3 KiB
YAML

linters:
enable:
- dupword
- durationcheck
- errname
- errorlint
- gci
- ginkgolinter
- gofmt
- goimports
- gosec
- govet
- misspell
- nakedret
- revive
- unconvert
- usestdlibvars
- whitespace
run:
timeout: "16m"
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude:
# Allow dot imports for test files
- 'dot-imports: should not use dot import'
# Allow unused variables (necessary sometimes to match interfaces)
- "unused-parameter: parameter '.*' seems to be unused, consider removing or renaming it as _"
# Outdated warning, it only applies to Go < 1.22
# G601: Implicit memory aliasing in for loop.
- G601
linters-settings:
errorlint:
# We want to allow for usage of %v to avoid leaking implementation details
errorf: false
gci:
custom-order: true
sections:
- standard # Standard library
- prefix(github.com/onsi/) # Ginko and Gomega
- default # Everything else
- prefix(k8s.io) # Kubernetes
- prefix(sigs.k8s.io) # Kubernetes
- prefix(kubevirt.io) # Kubevirt
ginkgolinter:
forbid-focus-container: true
nakedret:
max-func-lines: 0
gosec:
excludes:
# This is changing things up quite a bit and requires evaluation
# per conversion
- G115