-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
63 lines (60 loc) · 2.22 KB
/
.golangci.yml
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
linters-settings:
gosec:
# Currently excluding rule G602 due to issue slowing down execution
# https://github.com/securego/gosec/issues/1010
# If we ever re-enable this rule, make sure https://github.com/securego/gosec/issues/1005 is also fixed
excludes:
- "G602"
govet:
enable:
- shadow
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
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
local-prefixes: github.com/cms-enterprise/easi-app
revive:
confidence: 0.1 # Default is 0.8. We want to ignore things that have an extremely low confidence level
exhaustive:
# Presence of "default" case in switch statements satisfies exhaustiveness,
# even if all enum members are not listed.
# Default: false
default-signifies-exhaustive: true
linters:
enable:
- gosec
- gofmt
- goimports
- govet
- typecheck
- ineffassign
- revive
- staticcheck
- stylecheck
- gosimple #will be deprecated in golangci-lint v2.0 in favor of staticcheck https://github.com/golangci/golangci-lint/issues/357
- unused #will be deprecated in golangci-lint v2.0 in favor of staticcheck https://github.com/golangci/golangci-lint/issues/357
- exhaustive
- sqlclosecheck
disable:
- errcheck #requires patching code
issues:
exclude-use-default: false
exclude:
- "ST1000" # Exclude package comments from `stylecheck`
exclude-files:
- "pkg/graph/generated/generated.go" # Since we don't ignore _all_ generated files, we have to ignore this one specifically
- "pkg/models/models_gen.go" # Since we don't ignore _all_ generated files, we have to ignore this one specifically
exclude-rules:
- text: 'shadow: declaration of "err" shadows declaration at'
linters: [ govet ]
exclude-generated: disable
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 8m
concurrency: 1