2022-04-13 19:00:32 +00:00
|
|
|
linters-settings:
|
|
|
|
dupl:
|
|
|
|
threshold: 100
|
|
|
|
funlen:
|
|
|
|
lines: 100
|
|
|
|
statements: 50
|
|
|
|
gci:
|
2022-09-22 07:46:56 +00:00
|
|
|
local-prefixes: code.icb4dc0.de/prskr/kreaper
|
2022-04-13 19:00:32 +00:00
|
|
|
goconst:
|
|
|
|
min-len: 2
|
|
|
|
min-occurrences: 2
|
|
|
|
gocritic:
|
|
|
|
enabled-tags:
|
|
|
|
- diagnostic
|
|
|
|
- opinionated
|
|
|
|
- performance
|
|
|
|
disabled-checks:
|
|
|
|
- ifElseChain
|
|
|
|
- octalLiteral
|
|
|
|
- wrapperFunc
|
|
|
|
# see https://github.com/golangci/golangci-lint/issues/2649
|
|
|
|
- hugeParam
|
|
|
|
- rangeValCopy
|
|
|
|
# settings:
|
|
|
|
# hugeParam:
|
|
|
|
# sizeThreshold: 200
|
|
|
|
|
|
|
|
gocyclo:
|
|
|
|
min-complexity: 15
|
|
|
|
goimports:
|
2022-09-22 07:46:56 +00:00
|
|
|
local-prefixes: code.icb4dc0.de/prskr/kreaper
|
2022-04-13 19:00:32 +00:00
|
|
|
golint:
|
|
|
|
min-confidence: 0
|
|
|
|
gomnd:
|
|
|
|
settings:
|
|
|
|
mnd:
|
|
|
|
# don't include the "operation" and "assign"
|
|
|
|
checks:
|
|
|
|
- argument
|
|
|
|
- case
|
|
|
|
- condition
|
|
|
|
- return
|
|
|
|
gomoddirectives:
|
|
|
|
replace-allow-list:
|
|
|
|
# pin versions
|
|
|
|
- k8s.io/api
|
|
|
|
- k8s.io/apiextensions-apiserver
|
|
|
|
- k8s.io/apimachinery
|
|
|
|
- k8s.io/client-go
|
|
|
|
- k8s.io/component-base
|
|
|
|
govet:
|
|
|
|
check-shadowing: true
|
|
|
|
enable-all: true
|
|
|
|
disable:
|
|
|
|
- fieldalignment
|
|
|
|
# see https://github.com/golangci/golangci-lint/issues/2649
|
|
|
|
- nilness
|
|
|
|
- unusedwrite
|
|
|
|
importas:
|
|
|
|
no-unaliased: true
|
|
|
|
alias:
|
|
|
|
- pkg: (k8s.io/api|k8s.io/apimachinery/pkg/apis)/([A-z0-9]+)/([A-z0-9]+)
|
|
|
|
alias: $2$3
|
|
|
|
lll:
|
|
|
|
line-length: 140
|
|
|
|
misspell:
|
|
|
|
locale: US
|
|
|
|
nolintlint:
|
|
|
|
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
|
|
|
|
allow-unused: false # report any unused nolint directives
|
|
|
|
require-explanation: false # don't require an explanation for nolint directives
|
|
|
|
require-specific: true
|
|
|
|
|
|
|
|
linters:
|
|
|
|
disable-all: true
|
|
|
|
enable:
|
|
|
|
- contextcheck
|
|
|
|
- dogsled
|
|
|
|
- dupl
|
|
|
|
- errcheck
|
|
|
|
- errchkjson
|
|
|
|
- errname
|
|
|
|
- errorlint
|
|
|
|
- exhaustive
|
|
|
|
- exportloopref
|
|
|
|
- funlen
|
|
|
|
- gocognit
|
|
|
|
- goconst
|
2022-05-13 14:16:28 +00:00
|
|
|
- gocritic
|
2022-04-13 19:00:32 +00:00
|
|
|
- gocyclo
|
|
|
|
- godox
|
|
|
|
- gofumpt
|
|
|
|
- goimports
|
|
|
|
- gomoddirectives
|
|
|
|
- gomnd
|
|
|
|
- gosec
|
2022-05-13 14:16:28 +00:00
|
|
|
# - gosimple
|
2022-04-13 19:00:32 +00:00
|
|
|
- govet
|
|
|
|
- importas
|
|
|
|
- ineffassign
|
2022-05-13 14:16:28 +00:00
|
|
|
- ireturn
|
2022-04-13 19:00:32 +00:00
|
|
|
- lll
|
|
|
|
- misspell
|
|
|
|
- nakedret
|
|
|
|
- nestif
|
|
|
|
- nilnil
|
|
|
|
- noctx
|
|
|
|
- nolintlint
|
2022-05-13 14:16:28 +00:00
|
|
|
- nosprintfhostport
|
2022-04-13 19:00:32 +00:00
|
|
|
- paralleltest
|
|
|
|
- prealloc
|
|
|
|
- predeclared
|
|
|
|
- promlinter
|
2022-05-13 14:16:28 +00:00
|
|
|
# - staticcheck
|
|
|
|
# - stylecheck
|
2022-04-13 19:00:32 +00:00
|
|
|
- tenv
|
|
|
|
- testpackage
|
|
|
|
- thelper
|
|
|
|
- typecheck
|
|
|
|
- unconvert
|
|
|
|
- unparam
|
|
|
|
- whitespace
|
2022-09-22 07:46:56 +00:00
|
|
|
- unused
|
2022-04-13 19:00:32 +00:00
|
|
|
- wastedassign
|
|
|
|
|
|
|
|
issues:
|
|
|
|
# Excluding configuration per-path, per-linter, per-text and per-source
|
|
|
|
exclude-rules:
|
|
|
|
- path: _test\.go
|
|
|
|
linters:
|
|
|
|
- dupl
|
|
|
|
- funlen
|
|
|
|
- gocognit
|
|
|
|
- gomnd
|
|
|
|
- govet
|
|
|
|
- path: magefiles/
|
|
|
|
linters:
|
|
|
|
- deadcode
|
|
|
|
|
|
|
|
run:
|
2022-05-13 14:16:28 +00:00
|
|
|
go: "1.18"
|
2022-04-13 19:00:32 +00:00
|
|
|
skip-files:
|
|
|
|
- ".*.mock.\\.go$"
|
|
|
|
modules-download-mode: readonly
|
|
|
|
timeout: 5m
|