-
Notifications
You must be signed in to change notification settings - Fork 3
/
.golangci.yaml
91 lines (79 loc) · 1.79 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
---
linters:
enable-all: true
disable:
- exhaustruct # structs may be uninitialized
- nlreturn # covered by wsl cuddle rules
- goimports # conflicts with GCI
- nonamedreturns # named returns are acceptable in short functions
# deprecated
- gomnd
- execinquery
severity:
default-severity: major
issues:
exclude-use-default: false
exclude-case-sensitive: true
exclude-rules:
- path: _test\.go
linters:
- gochecknoglobals
- errcheck
- wrapcheck
- gosec
- goerr113
linters-settings:
depguard:
rules:
main:
list-mode: strict
allow:
- $gostd
- github.com/go-openapi
- github.com/gorilla/mux
- github.com/prometheus/alertmanager
- github.com/Masterminds/sprig/v3
- gitlab.com/slxh/go/env
- gitlab.com/slxh/go/slogutil
- gitlab.com/slxh/matrix/alertmanager_matrix
- gitlab.com/slxh/matrix/bot
- maunium.net/go/mautrix
gci:
sections:
- standard
- default
- localmodule
gosec:
excludes: []
govet:
enable-all: true
mnd:
ignored-numbers:
- '8'
- '16'
- '32'
- '64'
- '10'
nolintlint:
require-explanation: true
paralleltest:
ignore-missing: true
revive:
enable-all-rules: true
rules:
# conflicts with mnd
- name: add-constant
disabled: true
# named returns are acceptable in short functions
- name: bare-return
disabled: true
# conflicts with lll
- name: line-length-limit
disabled: true
# conflicts with errcheck
- name: unhandled-error
disabled: true
stylecheck:
checks: [all]
varnamelen:
min-name-length: 1