1
+ version : " 2"
1
2
run :
2
- timeout : 20m
3
3
build-tags :
4
4
- e2e
5
5
linters :
6
+ default : none
6
7
enable :
7
8
- asciicheck
8
9
- bidichk
@@ -15,8 +16,6 @@ linters:
15
16
- goconst
16
17
- gocyclo
17
18
- godot
18
- - gofmt
19
- - gosimple
20
19
- govet
21
20
- importas
22
21
- ineffassign
@@ -27,73 +26,90 @@ linters:
27
26
- nosprintfhostport
28
27
- predeclared
29
28
- promlinter
30
- - revive
31
29
- staticcheck
32
- - tenv
33
30
- unconvert
34
31
- unused
35
32
- wastedassign
36
33
- whitespace
37
- disable-all : true
38
-
39
- linters-settings :
40
- depguard :
41
- rules :
42
- main :
43
- deny :
44
- - { pkg: io/ioutil, desc: https://go.dev/doc/go1.16#ioutil }
45
- - { pkg: github.com/ghodss/yaml, desc: use sigs.k8s.io/yaml instead }
46
-
47
- revive :
34
+ settings :
35
+ depguard :
36
+ rules :
37
+ main :
38
+ deny :
39
+ - pkg : io/ioutil
40
+ desc : https://go.dev/doc/go1.16#ioutil
41
+ - pkg : github.com/ghodss/yaml
42
+ desc : use sigs.k8s.io/yaml instead
43
+ govet :
44
+ enable :
45
+ - nilness # find tautologies / impossible conditions
46
+ importas :
47
+ alias :
48
+ # Machine Controller
49
+ - pkg : k8c.io/machine-controller/sdk/apis/(\w+)/(v[\w\d]+)
50
+ alias : $1$2
51
+ # Kubernetes
52
+ - pkg : k8s.io/api/(\w+)/(v[\w\d]+)
53
+ alias : $1$2
54
+ - pkg : k8s.io/apimachinery/pkg/apis/meta/v1
55
+ alias : metav1
56
+ - pkg : k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
57
+ alias : apiextensionsv1
58
+ - pkg : k8s.io/apimachinery/pkg/api/errors
59
+ alias : apierrors
60
+ - pkg : k8s.io/apimachinery/pkg/util/errors
61
+ alias : kerrors
62
+ # Controller Runtime
63
+ - pkg : sigs.k8s.io/controller-runtime/pkg/client
64
+ alias : ctrlruntimeclient
65
+ # Other Kube APIs
66
+ - pkg : go.anx.io/go-anxcloud/pkg/apis/(\w+)/(v[\w\d]+)
67
+ alias : anx$1$2
68
+ - pkg : github.com/tinkerbell/tink/api/(v[\w\d]+)
69
+ alias : tink$1
70
+ - pkg : kubevirt.io/api/(\w+)/(v[\w\d]+)
71
+ alias : kubevirt$1$2
72
+ - pkg : kubevirt.io/containerized-data-importer-api/pkg/apis/(\w+)/(v[\w\d]+)
73
+ alias : cdi$1$2
74
+ no-unaliased : true
75
+ exclusions :
76
+ generated : lax
77
+ presets :
78
+ - comments
79
+ - common-false-positives
80
+ - legacy
81
+ - std-error-handling
48
82
rules :
49
- # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#add-constant
50
- - name : duplicated-imports
51
- severity : warning
52
-
53
- govet :
54
- enable :
55
- - nilness # find tautologies / impossible conditions
56
-
57
- importas :
58
- no-unaliased : true
59
- alias :
60
- # Machine Controller
61
- - pkg : k8c.io/machine-controller/sdk/apis/(\w+)/(v[\w\d]+)
62
- alias : $1$2
63
- # Kubernetes
64
- - pkg : k8s.io/api/(\w+)/(v[\w\d]+)
65
- alias : $1$2
66
- - pkg : k8s.io/apimachinery/pkg/apis/meta/v1
67
- alias : metav1
68
- - pkg : k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1
69
- alias : apiextensionsv1
70
- - pkg : k8s.io/apimachinery/pkg/api/errors
71
- alias : apierrors
72
- - pkg : k8s.io/apimachinery/pkg/util/errors
73
- alias : kerrors
74
- # Controller Runtime
75
- - pkg : sigs.k8s.io/controller-runtime/pkg/client
76
- alias : ctrlruntimeclient
77
- # Other Kube APIs
78
- - pkg : go.anx.io/go-anxcloud/pkg/apis/(\w+)/(v[\w\d]+)
79
- alias : anx$1$2
80
- - pkg : github.com/tinkerbell/tink/api/(v[\w\d]+)
81
- alias : tink$1
82
- - pkg : kubevirt.io/api/(\w+)/(v[\w\d]+)
83
- alias : kubevirt$1$2
84
- - pkg : kubevirt.io/containerized-data-importer-api/pkg/apis/(\w+)/(v[\w\d]+)
85
- alias : cdi$1$2
86
-
83
+ - path : (.+)\.go$
84
+ text : func Convert_MachinesV1alpha1Machine_To_ClusterV1alpha1Machine should be ConvertMachinesV1alpha1MachineToClusterV1alpha1Machine
85
+ - path : (.+)\.go$
86
+ text : func Convert_MachineDeployment_ProviderConfig_To_ProviderSpec should be ConvertMachineDeploymentProviderConfigToProviderSpec
87
+ - path : (.+)\.go$
88
+ text : func Convert_MachineSet_ProviderConfig_To_ProviderSpec should be ConvertMachineSetProviderConfigToProviderSpec
89
+ - path : (.+)\.go$
90
+ text : func Convert_Machine_ProviderConfig_To_ProviderSpec should be ConvertMachineProviderConfigToProviderSpec
91
+ - path : (.+)\.go$
92
+ text : cyclomatic complexity [0-9]+ of func `\(\*provider\)\.Create` is high
93
+ - path : (.+)\.go$
94
+ text : cyclomatic complexity [0-9]+ of func `\(\*provider\)\.Validate` is high
95
+ - path : (.+)\.go$
96
+ text : cyclomatic complexity [0-9]+ of func `\(\*provider\)\.getConfig` is high
97
+ - path : (.+)\.go$
98
+ text : ' SA1019: s.server.IPv6 is deprecated'
99
+ paths :
100
+ - apis/machines
101
+ - third_party$
102
+ - builtin$
103
+ - examples$
87
104
issues :
88
105
max-same-issues : 0
89
- exclude :
90
- - func Convert_MachinesV1alpha1Machine_To_ClusterV1alpha1Machine should be ConvertMachinesV1alpha1MachineToClusterV1alpha1Machine
91
- - func Convert_MachineDeployment_ProviderConfig_To_ProviderSpec should be ConvertMachineDeploymentProviderConfigToProviderSpec
92
- - func Convert_MachineSet_ProviderConfig_To_ProviderSpec should be ConvertMachineSetProviderConfigToProviderSpec
93
- - func Convert_Machine_ProviderConfig_To_ProviderSpec should be ConvertMachineProviderConfigToProviderSpec
94
- - ' cyclomatic complexity [0-9]+ of func `\(\*provider\)\.Create` is high'
95
- - ' cyclomatic complexity [0-9]+ of func `\(\*provider\)\.Validate` is high'
96
- - ' cyclomatic complexity [0-9]+ of func `\(\*provider\)\.getConfig` is high'
97
- - " SA1019: s.server.IPv6 is deprecated"
98
- exclude-dirs :
99
- - apis/machines
106
+ formatters :
107
+ enable :
108
+ - gofmt
109
+ exclusions :
110
+ generated : lax
111
+ paths :
112
+ - apis/machines
113
+ - third_party$
114
+ - builtin$
115
+ - examples$
0 commit comments