File tree 2 files changed +48
-37
lines changed
2 files changed +48
-37
lines changed Original file line number Diff line number Diff line change
1
+ ---
1
2
name : golangci-lint
2
3
3
4
on :
4
5
pull_request :
5
6
paths-ignore :
6
- - ' README.md'
7
+ - README.md
7
8
push :
8
9
paths-ignore :
9
- - ' README.md'
10
+ - README.md
10
11
11
12
permissions :
12
13
contents : read
@@ -22,11 +23,11 @@ jobs:
22
23
- name : Setup Go
23
24
uses : actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5.4.0
24
25
with :
25
- go-version-file : ' go.mod'
26
+ go-version-file : go.mod
26
27
cache : true
27
28
- run : go mod download
28
29
- run : go build -v .
29
30
- name : Run Linters
30
- uses : golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6.5.2
31
+ uses : golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7.0.0
31
32
with :
32
33
version : latest
Original file line number Diff line number Diff line change 1
- # © Broadcom. All Rights Reserved.
2
- # The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.
3
- # SPDX-License-Identifier: MPL-2.0
1
+ ---
2
+ version : " 2"
4
3
5
- # For more information about the golangci-lint configuration file, refer to:
6
- # https://golangci-lint.run/usage/configuration/
7
-
8
- issues :
9
- max-per-linter : 0
10
- max-same-issues : 0
11
- exclude-rules :
12
- # Exclude errcheck for some rules.
13
- - linters : [errcheck]
14
- text : " Error return value of `d.Set` is not checked"
15
- # Exclude revive for some rules.
16
- - linters :
17
- - revive
18
- text : ' redefines-builtin-id: redefinition of the built-in'
19
-
20
- run :
21
- deadline : 5m
4
+ output :
5
+ formats :
6
+ text :
7
+ path : stdout
22
8
23
9
linters :
24
- disable-all : true
10
+ default : none
25
11
enable :
26
12
- errcheck
27
- - gofmt
28
- - goimports
29
- - gosimple
30
13
- gosec
31
14
- govet
32
15
- ineffassign
@@ -35,14 +18,41 @@ linters:
35
18
- staticcheck
36
19
- unconvert
37
20
- unused
21
+ settings :
22
+ errcheck :
23
+ exclude-functions :
24
+ - github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set
25
+ - fmt:.*
26
+ - io:Close
27
+ exclusions :
28
+ generated : lax
29
+ presets :
30
+ - comments
31
+ - common-false-positives
32
+ - legacy
33
+ - std-error-handling
34
+ rules :
35
+ - linters :
36
+ - errcheck
37
+ text : Error return value of `d.Set` is not checked
38
+ - linters :
39
+ - revive
40
+ text : ' redefines-builtin-id: redefinition of the built-in'
41
+ paths :
42
+ - third_party$
43
+ - builtin$
44
+ - examples$
38
45
39
- output :
40
- formats :
41
- - format : colored-line-number
46
+ issues :
47
+ max-same-issues : 0
42
48
43
- linters-settings :
44
- errcheck :
45
- exclude-functions :
46
- - " github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema:ForceNew|Set"
47
- - " fmt:.*"
48
- - " io:Close"
49
+ formatters :
50
+ enable :
51
+ - gofmt
52
+ - goimports
53
+ exclusions :
54
+ generated : lax
55
+ paths :
56
+ - third_party$
57
+ - builtin$
58
+ - examples$
You can’t perform that action at this time.
0 commit comments