-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.golangci.yml
56 lines (53 loc) · 1.04 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
run:
timeout: "10m"
skip-files:
- "*/_test\\.go$" # 使用双反斜杠转义点
linters:
disable-all: true
enable:
# basic
- govet
- staticcheck
- errcheck
- ineffassign
- gosimple
- unused
# style
- gofmt
- goimports
- misspell
- stylecheck
- dupl
- wsl
- goconst
# complexity
- funlen
- gocyclo
- lll
# security
- gosec
linters-settings:
funlen:
# Checks the number of lines in a function.
lines: 80
# Checks the number of statements in a function.
statements: 40
# Ignore comments when counting lines.
ignore-comments: true
lines-in-file: 800
gocyclo:
# Minimal code complexity to report.
# Default: 30 (but we recommend 10-20)
min-complexity: 15
lll:
# Max line length, lines longer will be reported.
# Default: 120.
line-length: 120
dupl:
# Tokens count to trigger issue.
# Default: 150
threshold: 100
output:
format: colored-line-number
print-issued-lines: true
print-config: true