-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yaml
More file actions
116 lines (103 loc) · 3.06 KB
/
.golangci.yaml
File metadata and controls
116 lines (103 loc) · 3.06 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
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
version: "2"
run:
timeout: "5m"
relative-path-mode: "gomod"
formatters:
enable:
- "gofumpt"
- "goimports"
settings:
gofumpt:
# Choose whether to use the extra rules.
# Default: false
extra-rules: true
goimports:
# A 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/check_syncthing"
linters:
enable:
- "asciicheck"
- "bidichk"
- "copyloopvar"
- "embeddedstructfieldcheck"
- "errorlint"
- "gocritic"
- "makezero"
- "misspell"
- "modernize"
- "nilnesserr"
- "nolintlint"
- "perfsprint"
- "prealloc"
- "predeclared"
- "testifylint"
- "unconvert"
- "usestdlibvars"
- "usetesting"
- "wastedassign"
- "wrapcheck"
settings:
errcheck:
exclude-functions:
# List of functions to exclude from checking, where each entry is a
# single function to exclude. See
# https://github.com/kisielk/errcheck#excluding-functions for details.
- "io/ioutil.ReadFile"
- "io.Copy(*bytes.Buffer)"
- "io.Copy(os.Stdout)"
- "(io.ReadCloser).Close"
- "(net.Conn).Close"
- "(*os.File).Close"
# Display function signature instead of selector.
# Default: false
verbose: true
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
staticcheck:
# SAxxxx checks in https://staticcheck.dev/docs/configuration/options/#checks
# Example (to disable some checks): [ "all", "-SA1000", "-SA1001"]
# Default: ["all", "-ST1000", "-ST1003", "-ST1016", "-ST1020", "-ST1021", "-ST1022"]
checks:
- "all"
- "-ST1000"
- "-ST1003"
# Poorly chosen receiver name
# https://staticcheck.dev/docs/checks/#ST1006
- "-ST1006"
# ST1011 - Poorly chosen name for variable of type time.Duration
# https://staticcheck.dev/docs/checks/#ST1011
- "-ST1011"
- "-ST1016"
- "-ST1020"
- "-ST1021"
- "-ST1022"
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.
ignore-package-globs:
- "github.com/dsh2dsh/check_syncthing/*"
exclusions:
rules:
- path: '_test\.go'
linters:
- "errcheck"
- "wrapcheck"