-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
90 lines (90 loc) · 1.97 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
90
linters:
presets:
- bugs # bugs detection
- comment # comments analysis
- complexity # code complexity analysis
- error # error handling analysis
- format # code formatting
# - import # imports analysis
- metalinter # linter that contains multiple rules or multiple linters
# - module # Go modules analysis
- performance # performance
- sql # SQL
# - style # coding style
# - test # the analysis of the code of the tests
- unused
enable:
# module; depguard & gomodguard is useless in almost any project
- gomoddirectives
# style preset
- asciicheck
- containedctx
- dogsled
- dupl
- errname
- forcetypeassert
- gochecknoglobals
- gochecknoinits
- goconst
- godox
- goprintffuncname
- gosimple
- lll
- makezero
- nakedret
- nolintlint
- nosprintfhostport
- predeclared
- promlinter
- stylecheck
- tagliatelle
- thelper
- tparallel
- unconvert
- whitespace
- wastedassign
disable:
# bugs
- scopelint # deprecated and superseded by exportloopref
# performance
- maligned # deprecated and superseded by govet(fieldalignment)
# unused
- deadcode # deprecated and superseded by unused
- structcheck # deprecated and superseded by unused
- varcheck # deprecated and superseded by unused
linters-settings:
dogsled:
max-blank-identifiers: 3
errcheck:
exclude: .errcheck_excludes.txt
errorlint:
errorf: true
funlen:
lines: 100
statements: 60
gci:
sections:
- standard
- default
- prefix(go.pr0ger.dev/x)
godot:
scope: declarations
goimports:
local-prefixes: go.pr0ger.dev/x
gomoddirectives:
replace-local: true
retract-allow-no-explanation: false
lll:
tab-width: 4
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- path: _test\.go
linters:
- dupl
- goerr113
- forcetypeassert
- text: "weak random number generator"
linters:
- gosec