This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
.golangci.yml
121 lines (111 loc) · 2.72 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
linters:
enable-all: false
enable:
- unparam
- whitespace
- unconvert
- bodyclose
- gofmt
- gocritic
- godot
- prealloc
- unconvert
- lll
- cyclop
- gci
- gosec
- prealloc
- revive
- gochecknoglobals
- funlen
disable:
- errcheck
- ineffassign
linters-settings:
govet:
check-shadowing: true
golint:
min-confidence: 0
gocyclo:
min-complexity: 20
cyclop:
min-complexity: 20
max-complexity: 30
gci:
custom-order: true
sections:
- standard
- default
- prefix(github.com/im-kulikov/helium)
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 2
gomoddirectives:
# List of allowed `replace` directives. Default is empty.
replace-allow-list:
- bou.ke/monkey
lll:
line-length: 140
funlen:
lines: 130
statements: 70
nestif:
# minimal complexity of if statements to report
min-complexity: 6
gocognit:
min-complexity: 35
issues:
exclude-rules:
- path: mock # We avoid warnings about comments for package and public functions in mock package.
linters:
- golint
- path: _test\.go
linters:
- goconst
- scopelint # To avoid warnings in table-driven tests combined with t.Run
- gochecknoglobals
- funlen
- dupl
- govet
- staticcheck
- gocyclo
- errcheck
- nlreturn
- path: slack_incoming_messages\.go
linters:
- dupl
- path: slack_outgoing_messages\.go
linters:
- dupl
- path: job\.go
linters:
- dupl
- path: postgres\.go
linters:
- errcheck
- path: parse_incoming_job\.go
linters:
- funlen
- gocyclo
exclude-use-default: false
exclude:
# golint: Package comment check for every file
- should have a package comment, unless
# govet: Common false positives
- (possible misuse of unsafe.Pointer|should have signature)
# gosec: Too many false-positives on 'unsafe' usage
- Use of unsafe calls should be audited
# gosec: Too many false-positives for parametrized shell calls
- Subprocess launch(ed with variable|ing should be audited)
# gosec: Duplicated errcheck checks
- G104
# gosec: Too many issues in popular repos
- (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less)
# gosec: False positive is triggered by 'src, err := ioutil.ReadFile(filename)'
- Potential file inclusion via variable
# gochecknoglobals: allow version variable
- "`version` is a global variable"
# revive: should have a package comment
- "package-comments: should have a package comment"