forked from rancher/eks-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
95 lines (91 loc) · 2.79 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
85
86
87
88
89
90
91
92
93
94
95
run:
timeout: 5m
go: "1.19"
skip-files:
- "zz_generated_*"
tests: false
allow-parallel-runners: true
output:
format: github-actions
linters:
disable-all: true
enable:
- dupl # check duplicated code
- goconst # check strings that can turn into constants
- gofmt # check fmt
- goimports # check imports
- gosec # check for security problems
- govet # check vet
- importas # check consistent import aliasing
- ineffassign # check ineffectual assignments
- misspell # check for misspelled English words
- nakedret # check naked returns in functions
- prealloc # check preallocated slice declarations
- revive # replacement for golint
- unconvert # check redundant type conversions
- whitespace # check for trailing whitespace and tabs
linters-settings:
revive:
rules:
# The following rules are recommended https://github.com/mgechev/revive#recommended-configuration
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: error-return
- name: error-strings
- name: error-naming
- name: exported
- name: increment-decrement
- name: var-naming
- name: var-declaration
- name: package-comments
- name: range
- name: receiver-naming
- name: time-naming
- name: indent-error-flow
- name: errorf
- name: empty-block
- name: superfluous-else
- name: unused-parameter
- name: unreachable-code
- name: redefines-builtin-id
- name: unexported-return
importas:
no-unaliased: true
alias:
# Kubernetes
- pkg: k8s.io/api/core/v1
alias: corev1
- pkg: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
alias: apiextensionsv1
- pkg: k8s.io/apimachinery/pkg/apis/meta/v1
alias: metav1
- pkg: k8s.io/apimachinery/pkg/util/runtime
alias: utilruntime
- pkg: sigs.k8s.io/controller-runtime/pkg/client
alias: runtimeclient
# Rancher EKS operator
- pkg: github.com/rancher/eks-operator/pkg/apis/eks.cattle.io/v1
alias: eksv1
- pkg: github.com/rancher/eks-operator/pkg/generated/controllers/eks.cattle.io/v1
alias: ekscontrollers
- pkg: github.com/rancher/eks-operator/pkg/eks
alias: awsservices
# Core Rancher
- pkg: github.com/rancher/rancher/pkg/apis/management.cattle.io/v3
alias: managementv3
issues:
exclude-rules:
- linters:
- revive
text: "var-naming: don't use an underscore in package name"
path: 'mock(\w+)/doc.go$'
- path: 'pkg/eks/create.go$'
text: "weak cryptographic primitive"
linters:
- gosec
- path: 'pkg/eks/create.go$'
text: "TLS InsecureSkipVerify set true."
linters:
- gosec