-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
49 lines (46 loc) · 1 KB
/
.golangci.yml
File metadata and controls
49 lines (46 loc) · 1 KB
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
version: "2"
run:
tests: true
linters:
enable:
- errcheck
- govet
- ineffassign
- staticcheck
- unused
- misspell
- unconvert
- unparam
settings:
errcheck:
check-type-assertions: true
# Ignore Close errors in defer (idiomatic Go cleanup pattern)
exclude-functions:
- (io.Closer).Close
- (*os.File).Close
- (*github.com/fsnotify/fsnotify.Watcher).Close
govet:
enable-all: true
disable:
- fieldalignment
misspell:
locale: US
exclusions:
paths:
- examples/
rules:
# Allow unused parameters in test files
- path: _test\.go
linters:
- unparam
# Allow dot imports in tests for testify
- path: _test\.go
text: "dot-imports"
# Ignore deprecated gitleaks Fragment (will be fixed in gitleaks v9)
- text: "SA1019.*detect.Fragment is deprecated"
linters:
- staticcheck
formatters:
enable:
- gofmt
- goimports