File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 go install gotest.tools/gotestsum@latest
2626
2727 - name : Install golangci-lint
28- uses : golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
28+ uses : golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
2929 with :
30- version : v1.62 .2
30+ version : v2.12 .2
3131
3232 github-actions-docs :
3333 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1- project_name : ld-find-code-refs
2-
1+ version : " 2"
32run :
4- deadline : 120s
53 tests : false
6-
74linters :
8- enable-all : true
5+ default : all
96 disable :
10- - golint
11- - stylecheck
12- - gochecknoglobals
13- - lll
14- - errcheck
15- - interfacer
16- - tagliatelle
17- - varnamelen
18- - nonamedreturns
19- - nlreturn # re-enable this after fixing all cases
20- - gomnd # re-enable this after fixing all cases
21- - nosnakecase
22- - ifshort # re-enable
23- - nilerr # re-enable
24- - goerr113
25- - exhaustivestruct
26- - exhaustruct
27- - exhaustive
28- - godot
29- - wsl # fix
30- - gocognit
31- - revive
32- - errname
33- - cyclop
34- - gofumpt # fix
35- - gci
36- - nestif # fix
37- - gosec
38- - gocritic
39- - depguard
40- - tagalign
41- - nilnil
42- fast : false
43-
44- linter-settings :
45- goimports :
46- local-prefixes : github.com/launchdarkly,gopkg.in/launchdarkly
47-
7+ - cyclop
8+ - funcorder
9+ - godoclint
10+ - gomodguard
11+ - modernize
12+ - noinlineerr
13+ - wsl_v5
14+ - depguard
15+ - err113
16+ - errcheck
17+ - errname
18+ - exhaustive
19+ - exhaustruct
20+ - gochecknoglobals
21+ - gocognit
22+ - gocritic
23+ - godot
24+ - gosec
25+ - lll
26+ - mnd
27+ - nestif
28+ - nilerr
29+ - nilnil
30+ - nlreturn
31+ - nonamedreturns
32+ - revive
33+ - tagalign
34+ - tagliatelle
35+ - varnamelen
36+ - wsl
37+ settings :
38+ staticcheck :
39+ checks :
40+ - all
41+ - -ST*
42+ - -QF*
43+ exclusions :
44+ generated : lax
45+ rules :
46+ - linters :
47+ - staticcheck
48+ text : SA5011
49+ - path : (.+)\.go$
50+ text : error returned from external package is unwrapped
51+ - path : (.+)\.go$
52+ text : error returned from interface method should be wrapped
53+ - path : (.+)\.go$
54+ text : comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error
55+ - path : (.+)\.go$
56+ text : comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error
57+ - path : (.+)\.go$
58+ text : non-wrapping format verb for fmt.Errorf. Use `%w` to format errors
59+ - path : (.+)\.go$
60+ text : append to slice `projectKeys` with non-zero initialized length
61+ paths :
62+ - third_party$
63+ - builtin$
64+ - examples$
4865issues :
49- exclude :
50- - " error returned from external package is unwrapped"
51- - " error returned from interface method should be wrapped"
52- - " comparing with == will fail on wrapped errors. Use errors.Is to check for a specific error" # should fix
53- - " comparing with != will fail on wrapped errors. Use errors.Is to check for a specific error" # should fix
54- - " non-wrapping format verb for fmt.Errorf. Use `%w` to format errors" # should fix
55- - " append to slice `projectKeys` with non-zero initialized length"
56- exclude-rules :
57- # Exclude some `staticcheck` messages.
58- - linters :
59- - staticcheck
60- text : " SA5011" # fix
61-
62- exclude-use-default : false
66+ max-issues-per-linter : 1000
6367 max-same-issues : 1000
64- max-per-linter : 1000
68+ formatters :
69+ enable :
70+ - gofmt
71+ - goimports
72+ settings :
73+ goimports :
74+ local-prefixes :
75+ - github.com/launchdarkly
76+ - gopkg.in/launchdarkly
77+ exclusions :
78+ generated : lax
79+ paths :
80+ - third_party$
81+ - builtin$
82+ - examples$
Original file line number Diff line number Diff line change 88// Get a list of delimiters to use for flag key matching
99// If defaults are disabled, only additional configured delimiters will be used
1010func GetDelimiters (opts options.Options ) []string {
11- delims := []string { `"` , `'` , "`" }
12- if opts .Delimiters .DisableDefaults {
13- delims = [] string {}
11+ delims := make ( []string , 0 , 3 + len ( opts . Delimiters . Additional )) //nolint:mnd
12+ if ! opts .Delimiters .DisableDefaults {
13+ delims = append ( delims , `"` , `'` , "`" )
1414 }
1515
1616 delims = append (delims , opts .Delimiters .Additional ... )
You can’t perform that action at this time.
0 commit comments