-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
79 lines (75 loc) · 2.28 KB
/
.golangci.yaml
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
# If this config is confusing, have a look here, it is documented from A-Z https://golangci-lint.run/usage/linters
linters-settings:
revive:
max-open-files: 2048 # Maximum number of open files at the same time.
ignore-generated-header: false # When set to false, ignores files with "GENERATED" header, similar to golint.
severity: warning # Sets the default severity.
enable-all-rules: false # Enable all available rules.
confidence: 0.8 # This means that linting errors with less than 0.8 confidence will be ignored.
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#exported
- name: exported
severity: warning
disabled: false
arguments:
- "checkPrivateReceivers"
- "sayRepetitiveInsteadOfStutters"
interfacebloat:
max: 5 # The maximum number of methods allowed for an interface.
goconst:
min-len: 3 # Minimal length of string constant.
min-occurrences: 3 # Minimum occurrences of constant string count to trigger issue.
ignore-tests: true
gci:
custom-order: true
sections:
- standard # Standard section: captures all standard packages.
- default # Default section: contains all imports that could not be matched to another section type.
- prefix(github.com/mrwormhole/emailer) # Custom section: groups all imports with the specified Prefix.
skip-generated: false
nolintlint:
allow-unused: false # report any unused nolint directives
require-explanation: false # don't require an explanation for nolint directives
require-specific: true # require nolint directives to be specific about which linter is being skipped
linters:
disable-all: true
enable:
# common mistakes
- govet
- staticcheck
- gosec
- bodyclose
- ineffassign
- errcheck
- typecheck
- durationcheck
- nilerr
- nilnil
- nolintlint
- wrapcheck
- sloglint
- noctx
- interfacebloat
# common styling
- gofmt
- goimports
- gci
- goconst
- gosimple
- dogsled
- errname
- forcetypeassert
- predeclared
- tenv
- unconvert
- unparam
- unused
- usestdlibvars
- whitespace
- stylecheck
- revive
issues:
exclude-use-default: false
run:
tests: true
timeout: 30s