1+ version : " 2"
2+
13run :
24 timeout : 10m
3-
4- linters-settings :
5- gci :
6- sections :
7- - " standard"
8- - " default"
9- - " prefix(github.com/external-secrets/bitwarden-sdk-server)"
10- - " blank"
11- - " dot"
12- goconst :
13- min-len : 3
14- min-occurrences : 3
15- gocritic :
16- enabled-tags :
17- - diagnostic
18- - experimental
19- - opinionated
20- - performance
21- - style
22- disabled-checks :
23- - dupImport
24- - ifElseChain
25- - octalLiteral
26- - whyNoLint
27- - wrapperFunc
28- - importShadow
29- - unnamedResult
30- - unnecessaryBlock
31- settings :
32- rangeValCopy :
33- sizeThreshold : 512
34- hugeParam :
35- sizeThreshold : 512
36- gocyclo :
37- min-complexity : 16
38- goheader :
39- template-path : ./hack/boilerplate.go.txt
40- dupl :
41- threshold : 200
42- lll :
43- line-length : 300
44- misspell :
45- locale : US
5+ allow-parallel-runners : true
466
477linters :
48- disable-all : true
8+ default : none
499 enable :
5010 - asciicheck
5111 - bodyclose
@@ -54,68 +14,136 @@ linters:
5414 - errcheck
5515 - errorlint
5616 - exhaustive
57- - exportloopref
58- - gci
17+ - copyloopvar
5918 - goheader
6019 - goconst
6120 - gocritic
6221 - godot
63- - gofmt
6422 - goprintffuncname
6523 - gosec
66- - gosimple
6724 - govet
6825 - ineffassign
69- - lll
7026 - misspell
27+ - modernize # A suite of analyzers that suggest simplifications to Go code, using modern language and library features. https://golangci-lint.run/docs/linters/configuration/#modernize
7128 - nakedret
7229 - nolintlint
7330 - prealloc
74- - staticcheck
75- - stylecheck
76- - typecheck
31+ - lll
7732 - unconvert
7833 - unparam
7934 - unused
8035 - whitespace
36+ settings :
37+ goconst :
38+ min-len : 3
39+ min-occurrences : 3
40+ gocritic :
41+ enabled-tags :
42+ - diagnostic
43+ - experimental
44+ - opinionated
45+ - performance
46+ - style
47+ disabled-checks :
48+ - dupImport
49+ - ifElseChain
50+ - octalLiteral
51+ - whyNoLint
52+ - wrapperFunc
53+ - importShadow
54+ - unnamedResult
55+ - unnecessaryBlock
56+ settings :
57+ rangeValCopy :
58+ sizeThreshold : 512
59+ hugeParam :
60+ sizeThreshold : 512
61+ gocyclo :
62+ min-complexity : 16
63+ goheader :
64+ template-path : ${config-path}/hack/boilerplate.go.txt
65+ dupl :
66+ threshold : 200
67+ govet :
68+ disable :
69+ - shadow
70+ lll :
71+ line-length : 300
72+ misspell :
73+ locale : US
74+ modernize :
75+ disable :
76+ - omitzero
77+ exclusions :
78+ paths :
79+ - runtime/template/v2/sprig
80+ rules :
81+ # Exclude some linters from running on tests files.
82+ - path : _test(ing)?\.go
83+ linters :
84+ - gocyclo
85+ - errcheck
86+ - dupl
87+ - gosec
88+ - unparam
89+ - lll
90+ - revive
8191
82- issues :
83- # Excluding configuration per-path and per-linter
84- exclude-rules :
85- # Exclude some linters from running on tests files.
86- - path : _test(ing)?\.go
87- linters :
88- - gocyclo
89- - errcheck
90- - dupl
91- - gosec
92- - unparam
93- - lll
92+ # Allow dot imports for Ginkgo and Gomega in test files
93+ - path : _test\.go
94+ text : " dot-imports:"
95+ linters :
96+ - revive
9497
95- # Ease some gocritic warnings on test files.
96- - path : _test\.go
97- text : " (unnamedResult|exitAfterDefer)"
98- linters :
99- - gocritic
98+ # Ease some gocritic warnings on test files.
99+ - path : _test\.go
100+ text : " (unnamedResult|exitAfterDefer)"
101+ linters :
102+ - gocritic
100103
101- # This is a "potential hardcoded credentials" warning. It's triggered by
102- # any variable with 'secret' in the same, and thus hits a lot of false
103- # positives in Kubernetes land where a Secret is an object type.
104- - text : " G101:"
105- linters :
106- - gosec
104+ # Exclude fake or mock packages from revive linter
105+ - path : /(fake|mock)/
106+ linters :
107+ - revive
107108
108- # The header check doesn't correctly parse the header as a code comment and is
109- # triggered by the perceived diff. The header check still correctly detects missing
110- # license headers and is useful for some cases.
111- - text : " Actual:"
112- linters :
113- - goheader
109+ # This is a "potential hardcoded credentials" warning. It's triggered by
110+ # any variable with 'secret' in the same, and thus hits a lot of false
111+ # positives in Kubernetes land where a Secret is an object type.
112+ - text : " G101:"
113+ linters :
114+ - gosec
115+
116+ # The header check doesn't correctly parse the header as a code comment and is
117+ # triggered by the perceived diff. The header check still correctly detects missing
118+ # license headers and is useful for some cases.
119+ - text : " Actual:"
120+ linters :
121+ - goheader
122+ issues :
123+ # Maximum issues count per one linter. Set to 0 to disable. Default is 50.
124+ max-issues-per-linter : 0
114125
115- # excluding deprecation check introduced on purpose in #2884
116- - path : pkg/provider/fake/fake.go
117- text : ' SA1019: data.ValueMap is deprecated: ValueMap is deprecated and is intended to be removed in the future, use the `value` field instead.'
118- - path : pkg/provider/fake/fake_test.go
119- text : ' SA1019: data.ValueMap is deprecated: ValueMap is deprecated and is intended to be removed in the future, use the `value` field instead.'
120126 # Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
121127 max-same-issues : 0
128+
129+ formatters :
130+ enable :
131+ - gci
132+ - gofmt
133+ - goimports
134+ - golines
135+ settings :
136+ goimports :
137+ local-prefixes :
138+ - github.com/external-secrets/bitwarden-sdk-server
139+ golines :
140+ # Target maximum line length.
141+ # Default: 100
142+ max-len : 200
143+ gci :
144+ sections :
145+ - " standard"
146+ - " default"
147+ - " prefix(github.com/external-secrets/bitwarden-sdk-server)"
148+ - " blank"
149+ - " dot"
0 commit comments