-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
executable file
·107 lines (105 loc) · 2.1 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
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
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0.8
gocyclo:
min-complexity: 15
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 3
misspell:
locale: EN
lll:
line-length: 150
goimports:
local-prefixes: example.com/aaa/bbb/
gocritic:
enabled-tags:
- diagnostic
- performance
- style
- experimental
disabled-checks:
- paramTypeCombine
- unnamedResult
funlen:
lines: 120
statements: 70
revive:
ignore-generated-header: true
severity: warning
confidence: 0.8
error-code: 0
warning-code: 0
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: duplicated-imports
- name: early-return
- name: empty-block
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: identical-branches
- name: if-return
- name: import-shadowing
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: range-val-address
- name: range-val-in-closure
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unnecessary-stmt
- name: unreachable-code
#- name: unhandled-error
- name: var-declaration
linters:
disable-all: true
enable:
- bodyclose
- dogsled
- errcheck
- exportloopref
#- funlen
- gochecknoinits
#- goconst
#- gocritic
- gofmt
- goimports
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- revive
- staticcheck
#- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-dirs:
- storage/addons/sqldb/testfixtures
exclude-rules:
- path: _test\.go
linters:
- dupl
- gosec
- funlen
- lll