Files
podman/.golangci.yml
Kir Kolyshkin f3e7b26fdd .golangci.yml: remove some linters
Let's take a look at each enabled linter and find out if it's needed;
remove those that make no sense.

* goheader: does nothing with empty configuration;
* gomodguard: does nothing with empty configuration;
* importas: does nothing with empty configuration;
* loggercheck: this repo does not use any loggers it checks (kitlog,klog,logr,zap);
* promlinter: this repo does not use Prometheus;
* sloginit: this repo does not use slog;
* spancheck: this repo does not use opentelemetry/opencensus;
* zerologlint: this repo does not use zerolog;

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2025-03-31 12:27:55 -07:00

89 lines
1.6 KiB
YAML

---
run:
concurrency: 6
timeout: 5m
modules-download-mode: readonly
linters:
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- decorder
- dogsled
- durationcheck
- errcheck
- errchkjson
- exptostd
- fatcontext
- ginkgolinter
- gocheckcompilerdirectives
- gochecksumtype
- gocritic
- gofmt
- goimports
- goprintffuncname
- gosimple
- govet
- grouper
- iface
- inamedparam
- ineffassign
- interfacebloat
- makezero
- mirror
- misspell
- nilerr
- nilnesserr
- nolintlint
- nosprintfhostport
- prealloc
- protogetter
- reassign
- recvcheck
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck
- testableexamples
- unconvert
- unparam
- unused
- usestdlibvars
- usetesting
- wastedassign
- whitespace
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