-
Notifications
You must be signed in to change notification settings - Fork 16
/
.golangci.yml
75 lines (71 loc) · 2.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
run:
tests: false
# NOTE: Verify `go.{mod,sum}` is up-to-date by attempting to download dependencies
# if anything is missing
modules-download-mode: readonly
output:
format: colored-line-number
print-issued-lines: true
print-linter-name: true
linters-settings:
errcheck:
# report about not checking of errors in type assetions: `a := b.(MyStruct)`;
# default is false: such cases aren't reported by default.
check-type-assertions: false
# print linter name in the end of issue text, default is true
govet:
check-shadowing: true
gocyclo:
# NOTE: Too-low cyclomatic complexity value
# results into worse code design and readability.
min-complexity: 25
maligned:
suggest-new: true
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 2
depguard:
list-type: blacklist
packages:
# logging is allowed only by logutils.Log, logrus
# is allowed to use only in logutils package
- github.com/sirupsen/logrus
# NOTE: Be very, very wary not to use GPL3 software as library
- github.com/golangci/golangci-lint
misspell:
locale: US
lll:
line-length: 140
goimports:
local-prefixes: github.com/sumup-oss/gocat
gocritic:
enabled-tags:
- performance
linters:
enable-all: true
disable:
# NOTE: Currently impossible to calculate the optimal order
# Can be enabled when https://github.com/mdempsky/maligned/issues/9 is merged.
- maligned
# NOTE: "effective" golang style is full of arguable practices.
# We don't need that and besides gofmt does the required minimum of style modifications.
- golint
# NOTE: Too much false positives
- unparam
# NOTE: It's a great linter, but gets in the way too often by not being customizable.
- gochecknoglobals
# NOTE: It considers too much things as magic numbers.
- gomnd
# NOTE: False positives.
- wsl
# NOTE: Pointless.
- funlen
- godox
- dupl
issues:
exclude-rules:
- text: "weak cryptographic primitive"
linters:
- gosec