-
Notifications
You must be signed in to change notification settings - Fork 51
/
.golangci.yml
89 lines (85 loc) · 2.07 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
run:
tests: true
timeout: 10m
allow-parallel-runners: true
concurrency: 4
linters:
disable-all: true
enable:
# Check for pass []any as any in variadic func(...any).
- asasalint
- asciicheck
# Checks for dangerous unicode character sequences.
# Super rare but why not to be a bit paranoid?
- bidichk
- dogsled
# Check for two durations multiplied together.
- durationcheck
- copyloopvar
- goconst
- gocritic
- gofumpt
- gosec
- gosimple
- govet
- godot
- ineffassign
- misspell
- nakedret
- errorlint
- nolintlint
# Finds shadowing of Go's predeclared identifiers.
# I hear a lot of complaints from junior developers.
# But after some time they find it very useful.
- predeclared
# Finds slices that could potentially be pre-allocated.
# Small performance win + cleaner code.
- prealloc
# Lint your Prometheus metrics name.
- promlinter
# Checks that package variables are not reassigned.
# Super rare case but can catch bad things (like `io.EOF = nil`)
- reassign
- staticcheck
- revive
- stylecheck
- typecheck
- thelper
- tenv
- tparallel
- unconvert
- unused
# Detect the possibility to use variables/constants from stdlib.
- usestdlibvars
# Finds wasted assignment statements.
- wastedassign
# - errcheck
issues:
exclude-rules:
- text: "Use of weak random number generator"
linters:
- gosec
- text: "Don't use ALL_CAPS in Go names"
linters:
- revive
- text: "ST1003:"
linters:
- stylecheck
# - text: "ST1016:"
# linters:
# - stylecheck
# - text: "leading space"
# linters:
# - nolintlint
max-issues-per-linter: 10000
max-same-issues: 10000
linters-settings:
dogsled:
max-blank-identifiers: 3
maligned:
# print struct with more effective memory layout or not, false by default
suggest-new: true
nolintlint:
allow-unused: false
require-explanation: false
require-specific: false