-
Notifications
You must be signed in to change notification settings - Fork 10
/
.golangci.yaml
109 lines (104 loc) · 3.09 KB
/
.golangci.yaml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
run:
timeout: 10m
skip-files: [ ]
linters:
enable-all: true
disable:
- varcheck # Deprecated.
- interfacer # Deprecated.
- scopelint # Deprecated.
- exhaustivestruct # Deprecated.
- deadcode # Deprecated.
- ifshort # Deprecated.
- nosnakecase # Deprecated.
- golint # Deprecated.
- maligned # Deprecated.
- structcheck # Deprecated.
- exhaustruct # Not relevant
- gochecknoglobals # Not relevant
- goerr113 # Not relevant
- wrapcheck # Not relevant
- lll # KubeBuilder annotations can be very long.
- ireturn # Not relevant
- dupl # Too many false positive
linters-settings:
govet:
enable-all: true
disable:
- fieldalignment
maligned:
suggest-new: true
goconst:
min-len: 5
min-occurrences: 3
misspell:
locale: US
funlen:
lines: -1
statements: 50
godox:
keywords:
- FIXME
gofumpt:
extra-rules: true
depguard:
rules:
main:
allow:
# This Go code shouldn't have access to the whole std lib (e.g. http).
- encoding/json
- errors
- fmt
- strings
- time
- embed
- bufio
- context
- io
- path/filepath
- testing
# Github.
- github.com/traefik/hub-crds
- github.com/stretchr/testify
# Kubernetes.
- k8s.io/api/core/v1
- k8s.io/api/networking/v1
- k8s.io/apiextensions-apiserver/pkg/apis/apiextensions
- k8s.io/apiextensions-apiserver/pkg/apiserver/schema
- k8s.io/apiextensions-apiserver/pkg/apiserver/validation
- k8s.io/apimachinery/pkg/api/meta
- k8s.io/apimachinery/pkg/api/validation
- k8s.io/apimachinery/pkg/apis/meta/v1
- k8s.io/apimachinery/pkg/util/validation
- k8s.io/apimachinery/pkg/util/yaml
- k8s.io/apimachinery/pkg/runtime
- k8s.io/kube-openapi/pkg/validation/validate
- k8s.io/apiserver/pkg/apis/cel
importas:
no-unaliased: true
goheader:
values:
const:
COMPANY: Traefik Labs
template: |-
Copyright (C) {{ YEAR-RANGE }} {{ COMPANY }}
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
issues:
exclude-rules:
- path: pkg/validation/v1alpha1/api_test.go
linters:
- maintidx
- path: pkg/validation/v1alpha1/version_test.go
linters:
- maintidx
exclude-dirs:
- hub/v1alpha1/generated/