-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
100 lines (92 loc) · 2.8 KB
/
.golangci.yml
File metadata and controls
100 lines (92 loc) · 2.8 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
version: "2"
run:
timeout: 3m
formatters:
enable:
- goimports
issues:
# Disable limits on the number of printed issues
max-issues-per-linter: 0 # 0 = no limit
max-same-issues: 0 # 0 = no limit
linters:
default: all
disable:
- dupl # Dupl is disabled, since we're generating a lot of boilerplate code.
- cyclop # Cyclop is disabled, since cyclomatic complexities is very abstract metric,
# that sometimes lead to strange linter behaviour.
- wsl # WSL is disabled, since it's obsolete. Using WSL_v5.
- nlreturn # nlreturn is disabled, since it's duplicated by wsl_v5.return check.
- ireturn # ireturn is disabled, since it's not needed.
- godox # godox is disabled to allow TODO comments for unimplemented functionality.
- gocognit # gocognit is disabled, cognitive complexity is too restrictive.
- funlen # funlen is disabled, function length limits are too restrictive.
- maintidx # maintidx is disabled, purpose of this metric is unknown.
exclusions:
generated: lax
rules:
- path: _test.go
linters:
- wrapcheck
- err113
- funlen
settings:
varnamelen:
ignore-names:
- tt
- ok
- tb
ignore-decls:
- mc *minimock.Controller
- t T
revive:
rules:
- name: var-naming
arguments:
- []
- []
- - skip-package-name-checks: true
godot:
scope: all
lll:
line-length: 120
tab-width: 4
wsl_v5:
allow-first-in-block: true
allow-whole-block: false
branch-max-lines: 2
case-max-lines: 0
default: all
depguard:
rules:
main:
files:
- "$all"
- "!$test"
allow:
- $gostd
- "github.com/tarantool/go-iproto"
- "github.com/tarantool/go-option"
- "github.com/tarantool/go-storage"
- "github.com/tarantool/go-tarantool/v2"
- "github.com/vmihailenco/msgpack/v5"
- "go.etcd.io/etcd/client/v3"
- "gopkg.in/yaml.v3"
# for etcd LazyCluster reimplementation
- "go.etcd.io/etcd/client/pkg/v3"
- "go.etcd.io/etcd/tests/v3/"
test:
files:
- "$test"
allow:
- $gostd
- "github.com/gojuno/minimock/v3"
- "github.com/stretchr/testify"
- "github.com/tarantool/go-iproto"
- "github.com/tarantool/go-option"
- "github.com/tarantool/go-storage"
- "github.com/tarantool/go-tarantool/v2"
- "github.com/vmihailenco/msgpack/v5"
- "go.etcd.io/etcd/api/v3"
- "go.etcd.io/etcd/client/v3"
- "go.etcd.io/etcd/tests/v3"
- "gopkg.in/yaml.v3"