-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy path.golangci.yml
More file actions
123 lines (120 loc) · 3.35 KB
/
.golangci.yml
File metadata and controls
123 lines (120 loc) · 3.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# .golangci.yml
version: "2"
run:
timeout: 5m
linters:
enable:
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
- funlen
- gochecknoinits
- goconst
- gocritic
- gocyclo
- ineffassign
- mnd # replacement for gomnd
- nakedret
- revive # replacement for golint
- rowserrcheck
- staticcheck
- unconvert
- unparam
- unused # covers deadcode/varcheck/structcheck
- whitespace
exclusions:
paths:
- test/testdata_etc
- internal/cache
- internal/renameio
- internal/robustio
rules:
- path: _test\.go
linters:
- mnd
settings:
depguard:
rules:
main:
list-mode: lax
allow:
- $gostd
- github.com/checkmarx/ast-cli/internal
- github.com/gookit/color
- github.com/CheckmarxDev/containers-resolver/pkg/containerResolver
- github.com/Checkmarx/manifest-parser/pkg/parser/models
- github.com/Checkmarx/manifest-parser/pkg/parser
- github.com/Checkmarx/secret-detection/pkg/hooks/pre-commit
- github.com/Checkmarx/secret-detection/pkg/hooks/pre-receive
- github.com/Checkmarx/gen-ai-prompts/prompts/sast_result_remediation
- github.com/spf13/viper
- github.com/checkmarx/2ms/v3/lib/reporting
- github.com/checkmarx/2ms/v3/lib/secrets
- github.com/checkmarx/2ms/v3/pkg
- github.com/Checkmarx/gen-ai-wrapper
- github.com/spf13/cobra
- github.com/pkg/errors
- github.com/google
- github.com/MakeNowJust/heredoc
- github.com/jsumners/go-getport
- github.com/stretchr/testify/assert
- github.com/gofrs/flock
- github.com/golang-jwt/jwt/v5
- github.com/Checkmarx/containers-images-extractor/pkg/imagesExtractor
- github.com/Checkmarx/containers-types/types
dupl:
threshold: 500
funlen:
lines: 200
statements: 100
goconst:
min-len: 2
min-occurrences: 2
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- octalLiteral
- whyNoLint
- wrapperFunc
gocyclo:
min-complexity: 15
mnd:
checks:
- argument
- case
- condition
- return
revive:
rules:
- name: exported
arguments:
- disableStutteringCheck
govet:
settings:
printf:
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
lll:
line-length: 185
misspell:
locale: US
formatters:
enable:
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- github.com/golangci/golangci-lint