-
Notifications
You must be signed in to change notification settings - Fork 40
/
.golangci.yml
84 lines (83 loc) · 1.85 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# options for analysis running
run:
modules-download-mode: mod
linters-settings:
depguard:
# Rules to apply.
# Default: Only allow $gostd in all files.
rules:
# Name of a rule.
main:
# List of file globs that will match this list of settings to compare against.
# Default: $all
files:
- "!**/*_a _file.go"
# List of allowed packages.
allow:
- $gostd
- k8s.io/apiextensions-apiserver
- k8s.io/apimachinery
- k8s.io/client-go/kubernetes
- k8s.io/client-go/rest
- k8s.io/klog/v2
- github.com/cert-manager/cert-manager
- github.com/vadimkim/cert-manager-webhook-hetzner/internal
# Packages that are not allowed where the value is a suggestion.
deny:
- pkg: "github.com/sirupsen/logrus"
desc: not allowed
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package
misspell:
locale: US
goimports:
local-prefixes: github.com/golangci/golangci-lint
gocritic:
enabled-tags:
- performance
- style
- experimental
disabled-checks:
- whyNoLint
- wrapperFunc
gosec:
excludes:
- G404 # Insecure random number source (rand)
revive:
rules:
- name: var-naming
disabled: true
linters:
disable-all: true
enable:
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- funlen
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- noctx
- nolintlint
- revive
- rowserrcheck
- staticcheck
- typecheck
- unconvert
- unparam
- unused
- whitespace