11# .golangci.yml
22
3-
3+ version : " 2 "
44run :
55 timeout : 5m
6- issues :
7- exclude-dirs :
8- - test/testdata_etc
9- - internal/cache
10- - internal/renameio
11- - internal/robustio
126
137linters :
14- disable-all : true
158 enable :
169 - bodyclose
1710 - depguard
@@ -23,107 +16,108 @@ linters:
2316 - goconst
2417 - gocritic
2518 - gocyclo
26- - gofmt
27- - goimports
2819 - ineffassign
2920 - mnd # replacement for gomnd
3021 - nakedret
3122 - revive # replacement for golint
3223 - rowserrcheck
3324 - staticcheck
34- - stylecheck
35- - typecheck
3625 - unconvert
3726 - unparam
3827 - unused # covers deadcode/varcheck/structcheck
3928 - whitespace
40-
41- linters.settings :
42- depguard :
43- list-type : blacklist
44- rules :
45- main :
46- allow :
47- - $gostd
48- - github.com/checkmarx/ast-cli/internal
49- - github.com/gookit/color
50- - github.com/CheckmarxDev/containers-resolver/pkg/containerResolver
51- - github.com/Checkmarx/manifest-parser/pkg/parser/models
52- - github.com/Checkmarx/manifest-parser/pkg/parser
53- - github.com/Checkmarx/secret-detection/pkg/hooks/pre-commit
54- - github.com/Checkmarx/secret-detection/pkg/hooks/pre-receive
55- - github.com/Checkmarx/gen-ai-prompts/prompts/sast_result_remediation
56- - github.com/spf13/viper
57- - github.com/checkmarx/2ms/v3/lib/reporting
58- - github.com/checkmarx/2ms/v3/lib/secrets
59- - github.com/checkmarx/2ms/v3/pkg
60- - github.com/Checkmarx/gen-ai-wrapper
61- - github.com/spf13/cobra
62- - github.com/pkg/errors
63- - github.com/google
64- - github.com/MakeNowJust/heredoc
65- - github.com/jsumners/go-getport
66- - github.com/stretchr/testify/assert
67- - github.com/gofrs/flock
68- - github.com/golang-jwt/jwt/v5
69- - github.com/Checkmarx/containers-images-extractor/pkg/imagesExtractor
70- - github.com/Checkmarx/containers-types/types
71- dupl :
72- threshold : 500
73- funlen :
74- lines : 200
75- statements : 100
76- goconst :
77- min-len : 2
78- min-occurrences : 2
79- gocritic :
80- enabled-tags :
81- - diagnostic
82- - experimental
83- - opinionated
84- - performance
85- - style
86- disabled-checks :
87- - dupImport # https://github.com/go-critic/go-critic/issues/845
88- - ifElseChain
89- - octalLiteral
90- - whyNoLint
91- - wrapperFunc
92- gocyclo :
93- min-complexity : 15
94- goimports :
95- local-prefixes : github.com/golangci/golangci-lint
96- mnd :
97- settings :
98- mnd :
99- checks : argument,case,condition,return
100- revive :
29+ exclusions :
30+ paths :
31+ - test/testdata_etc
32+ - internal/cache
33+ - internal/renameio
34+ - internal/robustio
10135 rules :
102- - name : exported
103- arguments :
104- - disableStutteringCheck
105- govet :
106- settings :
107- printf :
108- funcs :
109- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
110- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
111- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
112- - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
113- lll :
114- line-length : 185
115- maligned :
116- suggest-new : true
117- misspell :
118- locale : US
36+ - path : _test\.go
37+ linters :
38+ - mnd
39+ settings :
40+ depguard :
41+ rules :
42+ main :
43+ list-mode : lax
44+ allow :
45+ - $gostd
46+ - github.com/checkmarx/ast-cli/internal
47+ - github.com/gookit/color
48+ - github.com/CheckmarxDev/containers-resolver/pkg/containerResolver
49+ - github.com/Checkmarx/manifest-parser/pkg/parser/models
50+ - github.com/Checkmarx/manifest-parser/pkg/parser
51+ - github.com/Checkmarx/secret-detection/pkg/hooks/pre-commit
52+ - github.com/Checkmarx/secret-detection/pkg/hooks/pre-receive
53+ - github.com/Checkmarx/gen-ai-prompts/prompts/sast_result_remediation
54+ - github.com/spf13/viper
55+ - github.com/checkmarx/2ms/v3/lib/reporting
56+ - github.com/checkmarx/2ms/v3/lib/secrets
57+ - github.com/checkmarx/2ms/v3/pkg
58+ - github.com/Checkmarx/gen-ai-wrapper
59+ - github.com/spf13/cobra
60+ - github.com/pkg/errors
61+ - github.com/google
62+ - github.com/MakeNowJust/heredoc
63+ - github.com/jsumners/go-getport
64+ - github.com/stretchr/testify/assert
65+ - github.com/gofrs/flock
66+ - github.com/golang-jwt/jwt/v5
67+ - github.com/Checkmarx/containers-images-extractor/pkg/imagesExtractor
68+ - github.com/Checkmarx/containers-types/types
69+ dupl :
70+ threshold : 500
71+ funlen :
72+ lines : 200
73+ statements : 100
74+ goconst :
75+ min-len : 2
76+ min-occurrences : 2
77+ gocritic :
78+ enabled-tags :
79+ - diagnostic
80+ - experimental
81+ - opinionated
82+ - performance
83+ - style
84+ disabled-checks :
85+ - dupImport # https://github.com/go-critic/go-critic/issues/845
86+ - ifElseChain
87+ - octalLiteral
88+ - whyNoLint
89+ - wrapperFunc
90+ gocyclo :
91+ min-complexity : 15
92+ mnd :
93+ checks :
94+ - argument
95+ - case
96+ - condition
97+ - return
98+ revive :
99+ rules :
100+ - name : exported
101+ arguments :
102+ - disableStutteringCheck
103+ govet :
104+ settings :
105+ printf :
106+ funcs :
107+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
108+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
109+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
110+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
111+ lll :
112+ line-length : 185
113+ misspell :
114+ locale : US
119115
120- issues :
121- exclude-rules :
122- - path : _test\.go
123- linters :
124- - mnd
125-
126- service :
127- golangci-lint-version : 1.64.2
128- prepare :
129- - echo "No special prep steps needed"
116+ formatters :
117+ enable :
118+ - gofmt
119+ - goimports
120+ settings :
121+ goimports :
122+ local-prefixes :
123+ - github.com/golangci/golangci-lint
0 commit comments