-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yaml
130 lines (120 loc) · 3.94 KB
/
.golangci.yaml
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
# Options for analysis running.
run:
# Timeout for analysis, e.g. 30s, 5m.
# Default: 1m
timeout: 5m
# Which dirs to skip: issues from them won't be reported.
# Can use regexp here: `generated.*`, regexp is applied on full path,
# including the path prefix if one is set.
# Default value is empty list,
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work on Windows.
# skip-dirs: []
# Which files to skip: they will be analyzed, but issues from them won't be reported.
# Default value is empty list,
# but there is no need to include all autogenerated files,
# we confidently recognize autogenerated files.
# If it's not please let us know.
# "/" will be replaced by current OS file path separator to properly work on Windows.
# skip-files: []
# output configuration options
# output:
# Format: colored-line-number|line-number|json|colored-tab|tab|checkstyle|code-climate|junit-xml|github-actions|teamcity
#
# Multiple can be specified by separating them by comma, output can be provided
# for each of them by separating format name and path by colon symbol.
# Output path can be either `stdout`, `stderr` or path to the file to write to.
# Example: "checkstyle:report.xml,json:stdout,colored-line-number"
#
# Default: colored-line-number
# formats: colored-line-number
# Re-enable excluded linters. Restores missing documentation checks, among
# others.
# https://golangci-lint.run/usage/false-positives/#default-exclusions
# https://github.com/golangci/golangci-lint/issues/456#issuecomment-986837325
issues:
exclude-use-default: false
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- funlen
- goerr113
- err113
- wrapcheck
- maintidx
- path: registry/funcs\.go
linters:
- err113
linters:
# Enable specific linter
# https://golangci-lint.run/usage/linters/#enabled-by-default
# enable: []
# Enable all available linters.
# Default: false
enable-all: true
# Disable specific linter
# https://golangci-lint.run/usage/linters/#disabled-by-default
disable:
# Deprecated
- execinquery # Archived by the owner
- gomnd # Renamed to mnd
# Too strict.
- depguard
- testpackage
- varnamelen
- exhaustruct
- cyclop # redundant, covered by gocyclo
- nlreturn
- wsl
- nestif # redundant, covered by gocyclo
# Enable presets.
# https://golangci-lint.run/usage/linters
presets: []
# Run only fast linters from enabled linters set (first run won't be fast)
# Default: false
# fast: true
linters-settings:
errcheck:
check-type-assertions: false
check-blank: false
disable-default-exclusions: false
exclude-functions:
- fmt.Fprintf
- fmt.Fprintln
- fmt.Fprint
funlen:
# Ignore comments when counting lines.
ignore-comments: true
exhaustive:
default-signifies-exhaustive: true
ireturn:
# ireturn does not allow using `allow` and `reject` settings at the same time.
# Both settings are lists of the keywords and regular expressions matched to interface or package names.
# keywords:
# - `empty` for `any`
# - `error` for errors
# - `stdlib` for standard library
# - `anon` for anonymous interfaces
# - `generic` for generic interfaces added in go 1.18
# By default, it allows using errors, empty interfaces, anonymous interfaces,
# and interfaces provided by the standard library.
allow:
- anon
- error
- empty
- stdlib
- generic
- spec\.JSONPathValue
- spec\.FunctionExprArg
- spec\.Selector
- spec\.BasicExpr
- spec\.CompVal
# You can specify idiomatic endings for interface
# - (or|er)$
# reject-list of interfaces
# reject:
# - github.com\/user\/package\/v4\.Type
dupword:
ignore:
- R.