-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yml
92 lines (87 loc) · 2.37 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
run:
deadline: 4m
build-tags:
- netgo
modules-download-mode: readonly
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: colored-line-number
linters-settings:
errcheck:
check-type-assertions: false
check-blank: true
govet:
check-shadowing: true
goimports:
# put imports beginning with prefix after 3rd-party packages;
# it's a comma-separated list of prefixes
# local-prefixes: github.com/VertebrateResequencing/wr
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
unused:
# treat code as a program (not a library) and report unused exported identifiers; default is false.
# XXX: if you enable this setting, unused will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find funcs usages. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
unparam:
# Inspect exported functions, default is false. Set to true if no external program/library imports your code.
# XXX: if you enable this setting, unparam will report a lot of false-positives in text editors:
# if it's called for subdir of a project it can't find external interfaces. All text editor integrations
# with golangci-lint call it on a directory with the changed file.
check-exported: false
nakedret:
max-func-lines: 30
prealloc:
simple: true
range-loops: true
for-loops: true
linters:
enable-all: true
# enable:
# - deadcode
# - errcheck
# - gosimple
# - govet
# - ineffassign
# - staticcheck
# - structcheck
# - typecheck
# - unused
# - varcheck
# - goconst
# - gocritic
# - goimports
# - golint
# - gosec
# - interfacer
# - maligned
# - misspell
# - nakedret
# - prealloc
# - scopelint
# - stylecheck
# - unconvert
# - unparam
disable-all: false
disable:
- depguard
- dupl
- gochecknoglobals
- gochecknoinits
- gocyclo
- gofmt
- lll
issues:
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gocyclo
- errcheck
- dupl
- gosec
max-issues-per-linter: 0
max-same-issues: 0
new: true