File tree Expand file tree Collapse file tree 3 files changed +56
-47
lines changed
Expand file tree Collapse file tree 3 files changed +56
-47
lines changed Original file line number Diff line number Diff line change 2222 go-version : ' 1.24.x'
2323 cache : false
2424 - name : golangci-lint
25- uses : golangci/golangci-lint-action@55c2c1448f86e01eaae002a5a3a9624417608d84 # v6
25+ uses : golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8
Original file line number Diff line number Diff line change 1- run :
2- timeout : 5m
3-
4- linters-settings :
5- dupl :
6- threshold : 100
7- funlen :
8- lines : 100
9- statements : 50
10- goconst :
11- min-len : 2
12- min-occurrences : 3
13- gocritic :
14- enabled-tags :
15- - diagnostic
16- - experimental
17- - opinionated
18- - performance
19- - style
20- disabled-checks :
21- - dupImport # https://github.com/go-critic/go-critic/issues/845
22- - ifElseChain
23- - octalLiteral
24- - whyNoLint
25- gocyclo :
26- min-complexity : 15
27- lll :
28- line-length : 140
29- misspell :
30- locale : US
31-
1+ version : " 2"
322linters :
33- # please, do not use `enable-all`: it's deprecated and will be removed soon.
34- # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
35- disable-all : true
3+ default : none
364 enable :
375 - bodyclose
386 - dogsled
@@ -41,11 +9,8 @@ linters:
419 - goconst
4210 - gocritic
4311 - gocyclo
44- - gofmt
45- - goimports
4612 - goprintffuncname
4713 - gosec
48- - gosimple
4914 - govet
5015 - ineffassign
5116 - lll
@@ -55,15 +20,59 @@ linters:
5520 - noctx
5621 - nolintlint
5722 - staticcheck
58- - stylecheck
59- - typecheck
6023 - unconvert
6124 - unparam
6225 - unused
6326 - whitespace
64-
65- issues :
66- exclude-rules :
67- - path : _test\.go
68- linters :
69- - funlen
27+ settings :
28+ dupl :
29+ threshold : 100
30+ funlen :
31+ lines : 100
32+ statements : 50
33+ goconst :
34+ min-len : 2
35+ min-occurrences : 3
36+ gocritic :
37+ disabled-checks :
38+ - dupImport
39+ - ifElseChain
40+ - octalLiteral
41+ - whyNoLint
42+ enabled-tags :
43+ - diagnostic
44+ - experimental
45+ - opinionated
46+ - performance
47+ - style
48+ gocyclo :
49+ min-complexity : 15
50+ lll :
51+ line-length : 140
52+ misspell :
53+ locale : US
54+ exclusions :
55+ generated : lax
56+ presets :
57+ - comments
58+ - common-false-positives
59+ - legacy
60+ - std-error-handling
61+ rules :
62+ - linters :
63+ - funlen
64+ path : _test\.go
65+ paths :
66+ - third_party$
67+ - builtin$
68+ - examples$
69+ formatters :
70+ enable :
71+ - gofmt
72+ - goimports
73+ exclusions :
74+ generated : lax
75+ paths :
76+ - third_party$
77+ - builtin$
78+ - examples$
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ type TestResource struct {
1111}
1212
1313func (t * TestResource ) GetProperty (key string ) (string , error ) {
14- if key == "no_stringer" {
14+ if key == "no_stringer" { //nolint:staticcheck
1515 return "" , fmt .Errorf ("does not support legacy IDs" )
1616 } else if key == "no_properties" {
1717 return "" , fmt .Errorf ("does not support custom properties" )
You can’t perform that action at this time.
0 commit comments