mirror of
https://github.com/kubevirt/containerized-data-importer.git
synced 2025-06-03 06:30:22 +00:00

* 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>
57 lines
1.3 KiB
YAML
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
|