-
Notifications
You must be signed in to change notification settings - Fork 15
/
.golangci.yml
132 lines (130 loc) · 2.8 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
# All possible options can be found here
# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
# Deprecated
# - deadcode
# - golint
# - interfacer
# - maligned
# - scopelint
# - structcheck
# - varcheck
# - exhaustivestruct
# - ifshort
# - nosnakecase
linters-settings:
# Allow names like fd for file descriptors, or id for identifiers.
varnamelen:
min-name-length: 2
nestif:
min-complexity: 10
gosec:
excludes:
- G204 # We actually need to launch programs with a variable name.
- G301 # We actually need to set permissions higher than 0750.
- G302 # We actually need to set permissions higher than 0600.
- G304 # Yes we use variables for file names.
- G401 # We actually use md5 only to create IDs, it's ok.
- G501 # like above.
issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
linters:
# enable-all: true
fase: false
disable:
- err113 # I do use fmt.Errorf, allocating all of them at the start is counter productive.
- exhaustruct # too noisy
- forbidigo # I need to use println this is a CLI app.
- gochecknoglobals # Sometimes they are useful.
- cyclop # To be enabled in the future
- funlen # To be enabled in the future
- gocognit # To be enabled in the future
- gocyclo # To be enabled in the future
- wrapcheck # To be enabled in the future
enable:
- asasalint
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- decorder
- dogsled
- dupl
- dupword
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
- forcetypeassert
- gci
- ginkgolinter
- gocheckcompilerdirectives
- gochecknoinits
- goconst
- gocritic
- godot
- godox
- gofmt
- gofumpt
- goheader
- goimports
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- gosmopolitan
- govet
- grouper
- importas
- ineffassign
- interfacebloat
- ireturn
- lll
- loggercheck
- maintidx
- makezero
- mirror
- misspell
- musttag
- nakedret
- nestif
- nilerr
- nilnil
- nlreturn
- noctx
- nolintlint
- nonamedreturns
- nosprintfhostport
- paralleltest
- prealloc
- predeclared
- promlinter
- reassign
- revive
- rowserrcheck
- sqlclosecheck
- staticcheck
- stylecheck
- tagalign
- tagliatelle
- tenv
- testableexamples
- testpackage
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- usestdlibvars
- varnamelen
- wastedassign
- whitespace
- wsl
- zerologlint