-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy path.golangci.yml
91 lines (88 loc) · 1.98 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
# See https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
linters-settings:
govet:
enable-all: true
disable:
- shadow
unparam:
check-exported: true
nakedret:
max-func-lines: 1
linters:
enable-all: true
disable:
- testpackage
- nestif
- godot
- wsl
- lll
- dupl
- funlen
- gochecknoinits
- gochecknoglobals
- godox
- gocognit
- gocyclo
- gomnd
- err113
- errorlint # TODO able this lint
- forbidigo
- cyclop
- govet
- errname
- varnamelen
- nilnil
- exhaustruct
- nonamedreturns
- depguard
- musttag
- paralleltest
- nlreturn
- mnd
fast: true
issues:
fix: true
exclude-files:
- _test\.go
- example/*/*.go
max-issues-per-linter: 0
max-same-issues: 0
exclude-dirs:
- example
exclude-rules:
# Test
- path: _test\.go
text: "Using the variable on range scope `tt` in function literal"
linters:
- scopelint
- path: _test\.go
linters:
- unused
- structcheck
- forcetypeassert
- path: introspection/type.go
linters:
- structcheck # These types fits IntrospectionQuery
- path: config/config.go
text: "`Query` is unused" # used in main.go
linters:
- structcheck
- path: graphqljson/graphql.go
text: "`Extensions` is unused" # used in line 48
linters:
- structcheck
- path: config/config.go
text: "`ClientV2` is unused" # used in config/config.go
linters:
- structcheck
- path: graphqljson/graphql.go
text: "append to slice `frontier` with non-zero initialized length" # used in config/config.go
linters:
- makezero
- path: clientv2/client_test.go
text: "should not use built-in type string as key for value; define your own type to avoid collisions"
linters:
- staticcheck
- path: clientv2/client_test.go
linters:
- revive