-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yml
84 lines (74 loc) · 2.03 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
run:
timeout: "5m"
relative-path-mode: "gomod"
linters:
enable:
- "asciicheck"
- "bidichk"
- "copyloopvar"
- "errorlint"
- "gocritic"
- "gofumpt"
- "goimports"
- "makezero"
- "misspell"
- "nilnesserr"
- "nolintlint"
- "perfsprint"
- "prealloc"
- "predeclared"
- "revive"
- "sloglint"
- "testifylint"
- "unconvert"
- "usestdlibvars"
- "usetesting"
- "wastedassign"
- "wrapcheck"
linters-settings:
goconst:
# Ignore test files.
# Default: false
ignore-tests: true
goimports:
# A comma-separated list of prefixes, which, if set, checks import paths
# with the given prefixes are grouped after 3rd-party packages.
# Default: ""
local-prefixes: "github.com/dsh2dsh/zrepl"
nolintlint:
# 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
revive:
rules:
- name: "time-equal"
sloglint:
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
# https://github.com/go-simpler/sloglint?tab=readme-ov-file#attributes-only
# Default: false
attr-only: true
usetesting:
# Enable/disable `os.Setenv()` detections.
# Default: false
os-setenv: true
# Enable/disable `os.TempDir()` detections.
# Default: false
os-temp-dir: true
wrapcheck:
# An array of glob patterns which, if any match the package of the function
# returning the error, will skip wrapcheck analysis for this error. This is
# useful for broadly ignoring packages and/or subpackages from wrapcheck
# analysis. There are no defaults for this value.
ignorePackageGlobs:
- "encoding/*"
- "gopkg.in/yaml.v3"
- "github.com/dsh2dsh/zrepl/*"
issues:
exclude-rules:
- path: '_test\.go'
linters:
- "errcheck"
- "wrapcheck"