-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
103 lines (99 loc) · 1.67 KB
/
.golangci.yaml
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
linters:
disable-all: true
enable:
# default
- errcheck
- gosimple
- govet
- ineffassign
# - staticcheck
- unused
# custom
- bodyclose
# - dupl
- goconst
# - gocritic
- gocyclo
- nakedret
- gocognit
- funlen
- prealloc
- revive
- unconvert
- unparam
- sqlclosecheck
- gofmt
- goimports
- nilnil
# - testifylint
- gosec
# - lll
fast: false
linters-settings:
errcheck:
check-blank: true
govet:
enable:
- shadow
revive:
confidence: 0.3
unused:
post-statements-are-reads: true
dupl:
threshold: 100
goconst:
numbers: true
gocyclo:
min-complexity: 20
nakedret:
max-func-lines: 50
gocognit:
min-complexity: 20
funlen:
lines: 80
statements: 50
prealloc:
for-loops: true
unconvert:
fast-math: true
unparam:
check-exported: true
gofmt:
rewrite-rules:
- pattern: 'interface{}'
replacement: 'any'
- pattern: 'a[b:len(a)]'
replacement: 'a[b:]'
goimports:
local-prefixes: github.com/Benzogang-Tape/Reddit
nilnil:
detect-opposite: true
gosec:
excludes:
- G115
severity: high
lll:
line-length: 120
tab-width: 4
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude:
- "should have comment"
- "always receives"
- "parameter .* is always"
- "comment on exported .* should be of the form"
exclude-rules:
- linters:
- lll
source: "^//go:generate "
output:
formats:
- format: colored-line-number
path: stdout
show-stats: true
run:
timeout: 2m
issues-exit-code: 1
tests: true
go: '1.23'