-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
101 lines (93 loc) · 2.31 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
# See https://github.com/golangci/golangci-lint/issues/2649 for which linters
# are supported.
run:
skip-dirs-use-default: false
linters:
enable-all: true
disable:
- ireturn # This library intentionally return interfaces.
- wrapcheck # This library structures are intended to store errors.
# To Be Enabled
- varnamelen
- containedctx
# Deprecated linters
- deadcode
- exhaustivestruct
- golint
- ifshort
- interfacer
- maligned
- nosnakecase
- scopelint
- varcheck
# disabled because of generics
# See: https://github.com/golangci/golangci-lint/issues/2649
- contextcheck
- rowserrcheck
- sqlclosecheck
- structcheck
- wastedassign
linters-settings:
gci:
sections:
- standard
- default
- prefix(github.com/sagmor/fun)
depguard:
rules:
root:
files:
- "*.go"
allow:
- $gostd
- github.com/sagmor/fun
- github.com/sagmor/fun/maybe
- github.com/sagmor/fun/promise
- github.com/sagmor/fun/result
- github.com/sagmor/fun/task
tests:
files:
- tests/**/*.go
deny:
- pkg: none
revive:
enable-all-rules: true
rules:
- name: add-constant
arguments:
- maxLitCount: "3"
allowStrs: '""'
allowInts: "0,1,2"
allowFloats: "0.0,0.,1.0,1.,2.0,2."
- name: banned-characters
arguments: ["Ω", "Σ", "σ", "7"]
- name: cognitive-complexity
arguments: [7]
- name: exported
arguments:
- "checkPrivateReceivers"
- "sayRepetitiveInsteadOfStutters"
- name: argument-limit
arguments: [5]
- name: max-public-structs
arguments: [3]
- name: function-result-limit
arguments: [2]
# Disabled:
- name: file-header
disabled: true
- name: cyclomatic
disabled: true
- name: confusing-naming
disabled: true # Has issues with generics
- name: line-length-limit
disabled: true # Using lll instead of revive for this
- name: function-length
disabled: true
issues:
exclude-use-default: false
exclude-rules:
- path: "_test\\.go"
linters:
- revive
text: add-constant