-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yml
71 lines (66 loc) · 2.32 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
# https://golangci-lint.run/usage/configuration/
# To get the list of available linters: ./target/binutil/golangci-lint help linters
run:
issues-exit-code: 1
tests: true
timeout: 5m
skip-dirs-use-default: true
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
formats: colored-line-number
linters-settings:
funlen:
lines: 100
statements: 50
ignore-comments: true
gocognit:
min-complexity: 10
gocyclo:
min-complexity: 10
gofmt:
simplify: true
misspell:
locale: US
whitespace:
multi-if: false # Enforces newlines (or comments) after every multi-line if statement
multi-func: false # Enforces newlines (or comments) after every multi-line function signature
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/tecnickcom
test:
files:
- "$test"
allow:
- $gostd
- github.com/stretchr
issues:
exclude-dirs:
- .github
- .githook
exclude-rules:
- path: _test.go
linters:
- dupl
- funlen
# fix: true
linters:
enable-all: true
disable:
- depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false]
- exhaustruct # Checks if all structure fields are initialized [fast: false, auto-fix: false]
- err113 # Go linter to check the errors handling expressions [fast: false, auto-fix: false]
- ireturn # Accept Interfaces, Return Concrete Types [fast: false, auto-fix: false]
- lll # Reports long lines [fast: true, auto-fix: false]
- mnd # An analyzer to detect magic numbers. [fast: true, auto-fix: false]
- musttag # enforce field tags in (un)marshaled structs [fast: false, auto-fix: false]
- nlreturn # nlreturn checks for a new line before return and branch statements to increase code clarity [fast: true, auto-fix: false]
- tagliatelle # Checks the struct tags. [fast: true, auto-fix: false]
- testpackage # linter that makes you use a separate _test package [fast: true, auto-fix: false]
- varnamelen # checks that the length of a variable's name matches its scope [fast: false, auto-fix: false]
- exportloopref # deprecated