-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.golangci.yml
73 lines (70 loc) · 1.57 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
run:
timeout: 5m
skip-dirs:
- cmd/scratch
linters:
disable-all: true
enable:
- bodyclose
- dogsled
- errcheck
- exhaustive
- exportloopref
- exportloopref
- gocritic
- godot
- goerr113
- goheader
- goimports
- gosec
- gosimple
- govet
- ineffassign
- misspell
- noctx
- revive
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
linters-settings:
gocritic:
disabled-checks:
- appendAssign
- ifElseChain
- singleCaseSwitch
gosec:
excludes:
- G108 # Profiling endpoint is automatically exposed
- G401 # Use of weak cryptographic primitive
- G404 # Use of weak random number generator
- G501 # Blocklisted import crypto/md5
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
# It's complaining about InsecureSkipVerify being set to true, but we are
# setting it to true intentionally if the host is localhost.
- path: pkg/database/database.go
text: G402 # checking for InsecureSkipVerify
# Ignore a bunch of linters for test files.
- path: _test\.go
linters:
- errcheck
- goerr113
- gosec
- noctx
# The tableName struct field is used by go-pg, even if we don't use it
# directly.
- linters:
- unused
text: tableName
# It detects that only a single value is passed into a function, but
# sometimes it's useful to make it a bit abstract in anticipation for future
# use.
# - linters:
# - unparam
# text: always receives