-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy path.golangci.yml
More file actions
45 lines (40 loc) · 944 Bytes
/
.golangci.yml
File metadata and controls
45 lines (40 loc) · 944 Bytes
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
# golangci-lint configuration for Mole
# https://golangci-lint.run/usage/configuration/
version: "2"
run:
timeout: 5m
# Only lint Go code in cmd directory
modules-download-mode: readonly
linters:
enable:
# Default linters
- govet
- staticcheck
- errcheck
- ineffassign
- unused
# Additional linters
- modernize
settings:
govet:
enable-all: true
disable:
- shadow
- fieldalignment # struct field alignment optimization is noisy
errcheck:
exclude-functions:
- (io.Closer).Close
- (*os/exec.Cmd).Run
- (*os/exec.Cmd).Start
staticcheck:
checks: ["all", "-QF1003", "-SA9003"]
exclusions:
rules:
# Ignore certain patterns in test files
- path: _test\.go
linters:
- errcheck
# Ignore errors from os.Remove in cleanup code
- text: "os.Remove"
linters:
- errcheck