Commit bc871f5 1 parent 29c3d0a commit bc871f5 Copy full SHA for bc871f5
File tree 2 files changed +64
-68
lines changed
2 files changed +64
-68
lines changed Original file line number Diff line number Diff line change 1
1
name : golangci-lint
2
2
3
- on : [pull_request, push]
3
+ on :
4
+ pull_request :
5
+ paths-ignore :
6
+ - ' README.md'
7
+ push :
8
+ paths-ignore :
9
+ - ' README.md'
10
+
11
+ permissions :
12
+ contents : read
4
13
5
14
jobs :
6
- golangci :
7
- name : lint
15
+ build :
16
+ name : Build
8
17
runs-on : ubuntu-latest
18
+ timeout-minutes : 5
9
19
steps :
10
- - uses : actions/setup-go@v5
20
+ - name : Checkout
21
+ uses : actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
22
+ - name : Setup Go
23
+ uses : actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
11
24
with :
12
- go-version : 1.19
13
- - uses : actions/checkout@v4
14
- - name : golangci-lint
15
- uses : golangci/golangci-lint-action@v6
25
+ go-version-file : ' go.mod'
26
+ cache : true
27
+ - run : go mod download
28
+ - run : go build -v .
29
+ - name : Run Linters
30
+ uses : golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
16
31
with :
17
- version : v1.48.0
18
- args : --issues-exit-code=1
19
- only-new-issues : true
20
- skip-cache : true
32
+ version : latest
Original file line number Diff line number Diff line change 1
- # https://github.com/golangci/golangci-lint#config-file
1
+ # © Broadcom. All Rights Reserved.
2
+ # The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
3
+ # SPDX-License-Identifier: MPL-2.0
4
+
5
+ # For more information about the golangci-lint configuration file, refer to:
6
+ # https://golangci-lint.run/usage/configuration/
7
+
8
+ issues :
9
+ exclude-rules :
10
+ - path : _test\.go
11
+ linters :
12
+ - dogsled
13
+ - funlen
14
+ - gocognit
15
+ - path : internal/authctx
16
+ linters :
17
+ - gosec
18
+ - nestif
19
+ - path : flatten_test.go
20
+ linters :
21
+ - dupl
2
22
3
23
linters :
4
- # please, do not use `enable-all`: it's deprecated and will be removed soon.
5
- # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
6
24
disable-all : true
7
25
enable :
8
26
- asciicheck
9
27
- bodyclose
28
+ - copyloopvar
10
29
- depguard
11
30
- dogsled
12
31
- dupl
13
32
- errcheck
14
- - exportloopref
15
33
- funlen
16
34
- goconst
17
35
- gocognit
@@ -38,81 +56,47 @@ linters:
38
56
- whitespace
39
57
- wsl
40
58
41
- # don't enable:
42
- # - deadcode
43
- # - exhaustive
44
- # - gochecknoglobals
45
- # - godox
46
- # - gomnd
47
- # - goerr113
48
- # - gofumpt
49
- # - interfacer
50
- # - lll
51
- # - maligned
52
- # - nlreturn
53
- # - noctx
54
- # - nolintlint
55
- # - rowserrcheck
56
- # - scopelint
57
- # - structcheck
58
- # - testpackage
59
- # - revive
60
- # - varcheck
61
-
62
59
run :
63
- # include test files or not, default is true
64
- tests : true
65
60
deadline : 5m
66
61
build-tags :
67
62
- akscluster
68
63
- cluster
69
64
- clustergroup
65
+ - clustersecret
70
66
- credential
67
+ - custompolicy
71
68
- ekscluster
72
69
- gitrepository
70
+ - helmfeature
71
+ - helmrelease
73
72
- iampolicy
73
+ - imagepolicy
74
74
- kustomization
75
+ - managementcluster
76
+ - mutationpolicy
75
77
- namespace
76
- - custompolicy
77
- - imagepolicy
78
78
- networkpolicy
79
+ - packageinstall
80
+ - packagerepository
81
+ - provisioner
79
82
- quotapolicy
80
83
- securitypolicy
81
84
- sourcesecret
82
- - workspace
83
- - packageinstall
84
- - packagerepository
85
- - tanzupackages
86
85
- tanzupackage
87
- - clustersecret
88
- - mutationpolicy
89
- - helmfeature
90
- - helmrelease
91
- - managementcluster
92
- - provisioner
86
+ - tanzupackages
87
+ - workspace
88
+
89
+ output :
90
+ formats :
91
+ - format : colored-line-number
93
92
94
93
linters-settings :
95
94
funlen :
96
95
lines : 150
97
96
statements : 100
98
- nestif :
99
- min-complexity : 14
100
97
gocognit :
101
98
min-complexity : 60
102
99
goimports :
103
100
local-prefixes : github.com/vmware/terraform-provider-tanzu-mission-control
104
-
105
- issues :
106
- exclude-rules :
107
- - path : _test\.go
108
- linters :
109
- - dogsled
110
- - funlen
111
- - gocognit
112
- - path : internal/authctx
113
- linters :
114
- - gosec
115
- - nestif
116
- - path : flatten_test.go
117
- linters :
118
- - dupl
101
+ nestif :
102
+ min-complexity : 14
You can’t perform that action at this time.
0 commit comments