forked from arriven/db1000n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
156 lines (148 loc) · 3.61 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
linters-settings:
gci:
# Checks that no inline Comments are present.
# Default: false
no-inline-comments: true
# Checks that no prefix Comments(comment lines above an import) are present.
# Default: false
no-prefix-comments: true
# Section configuration to compare against.
# Section names are case-insensitive and may contain parameters in ().
# Default: ["standard", "default"]
sections:
- standard # Captures all standard packages if they do not match another section.
- default # Contains all imports that could not be matched to another section type.
- prefix(github.com/Arriven/db1000n) # Groups all imports with the specified Prefix.
# Separators that should be present between sections.
# Default: ["newLine"]
section-separators:
- newLine
gosec:
excludes:
- G404 # Cryptographically secure random not required across the whole project
lll:
# Max line length, lines longer will be reported.
# '\t' is counted as 1 character by default, and can be changed with the tab-width option.
# Default: 120.
line-length: 160
# Tab width in spaces.
# Default: 1
tab-width: 4
nolintlint:
# Disable to ensure that all nolint directives actually have an effect.
# Default: false
allow-unused: true
# Disable to ensure that nolint directives don't have a leading space.
# Default: true
allow-leading-space: false
# Exclude following linters from requiring an explanation.
# Default: []
allow-no-explanation: []
# Enable to require an explanation of nonzero length after each nolint directive.
# Default: false
require-explanation: true
# Enable to require nolint directives to mention the specific linter being suppressed.
# Default: false
require-specific: true
linters:
# Disable all linters.
# Default: false
# disable-all: true
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default-linters
enable:
- asciicheck
- bidichk
- bodyclose
- containedctx
- contextcheck
- cyclop
- deadcode
- decorder
- depguard
- dogsled
- dupl
- durationcheck
- errcheck
- errchkjson
- errname
- errorlint
- exhaustive
# - exhaustivestruct
- exportloopref
- forbidigo
- forcetypeassert
- funlen
- gci
# - gochecknoglobals
# - gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
# - godot
# - godox
# - goerr113
- gofmt
- gofumpt
- goheader
- goimports
# - golint # deprecated
- gomnd
- gomoddirectives
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- grouper
- ifshort
- importas
- ineffassign
# - interfacer # deprecated
# - ireturn
- lll
- maintidx
- makezero
# - maligned # deprecated
- misspell
- nakedret
- nestif
- nilerr
# - nilnil
- nlreturn
- noctx
- nolintlint
- paralleltest
- prealloc
- predeclared
- promlinter
- revive
- rowserrcheck
# - scopelint # deprecated
- sqlclosecheck
- staticcheck
- structcheck
- stylecheck
- tagliatelle
- tenv
# - testpackage
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- varcheck
# - varnamelen
- wastedassign
- whitespace
# - wrapcheck
- wsl
issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- funlen