-
Notifications
You must be signed in to change notification settings - Fork 15
/
.golangci.yml
84 lines (79 loc) · 2.25 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
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:
funlen:
lines: 160
statements: 80
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
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/terraform-provider-vaulted
gocritic:
enabled-tags:
- performance
linters:
enable-all: true
disable:
# 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: Full of false positives.
- interfacer
# NOTE: Function length is not an offense.
- funlen
# TODO: Fix false positives
- gomnd
# NOTE: "Packages names should not use underscores" is not a good practice while mixed caps is also disallowed.
- stylecheck
# NOTE: Too verbose
- exhaustivestruct
# NOTE: Worse readability
- nlreturn
# NOTE: False-positives
- nestif
# NOTE: Deprecated
- maligned
# TODO: Enable and fix offences
- goerr113
issues:
exclude-rules:
- text: "weak cryptographic primitive"
linters:
- gosec