Skip to content

Commit 1bff0cb

Browse files
committed
golangci-lint migrate
1 parent e14491c commit 1bff0cb

File tree

1 file changed

+38
-35
lines changed

1 file changed

+38
-35
lines changed

.golangci.yaml

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,41 @@
1+
version: "2"
12
run:
2-
# timeout for analysis, e.g. 30s, 5m, default is 1m
3-
deadline: 90s
43
build-tags:
54
- lint
6-
7-
linters-settings:
8-
gocyclo:
9-
# minimal code complexity to report, 30 by default (but we recommend 10-20)
10-
min-complexity: 25
11-
depguard:
12-
packages:
13-
- golang.org/x/net/context
14-
- github.com/gogo/protobuf/proto
15-
- encoding/asn1
16-
- crypto/x509
17-
18-
issues:
19-
# Don't turn off any checks by default. We can do this explicitly if needed.
20-
exclude-use-default: false
21-
# List of regexps of issue texts to exclude.
22-
#
23-
# But independently of this option we use default exclude patterns,
24-
# it can be disabled by `exclude-use-default: false`.
25-
# To list all excluded by default patterns execute `golangci-lint run --help`
26-
#
27-
# Default: https://golangci-lint.run/usage/false-positives/#default-exclusions
28-
exclude:
29-
- "package-comments: should have a package comment"
30-
31-
exclude-rules:
32-
# The following grpc linters are excluded because grpc.Dial, grpc.DialContext and grpc.WithBlock will be supported throughout 1.x.
33-
- linters: [staticcheck]
34-
text: 'SA1019: grpc.Dial is deprecated: use NewClient instead'
35-
- linters: [staticcheck]
36-
text: 'SA1019: grpc.DialContext is deprecated: use NewClient instead'
37-
- linters: [staticcheck]
38-
text: 'SA1019: grpc.WithBlock is deprecated: this DialOption is not supported by NewClient'
5+
linters:
6+
settings:
7+
depguard:
8+
rules:
9+
main:
10+
deny:
11+
- pkg: golang.org/x/net/context
12+
- pkg: github.com/gogo/protobuf/proto
13+
- pkg: encoding/asn1
14+
- pkg: crypto/x509
15+
gocyclo:
16+
min-complexity: 25
17+
exclusions:
18+
generated: lax
19+
rules:
20+
- linters:
21+
- staticcheck
22+
text: 'SA1019: grpc.Dial is deprecated: use NewClient instead'
23+
- linters:
24+
- staticcheck
25+
text: 'SA1019: grpc.DialContext is deprecated: use NewClient instead'
26+
- linters:
27+
- staticcheck
28+
text: 'SA1019: grpc.WithBlock is deprecated: this DialOption is not supported by NewClient'
29+
- path: (.+)\.go$
30+
text: 'package-comments: should have a package comment'
31+
paths:
32+
- third_party$
33+
- builtin$
34+
- examples$
35+
formatters:
36+
exclusions:
37+
generated: lax
38+
paths:
39+
- third_party$
40+
- builtin$
41+
- examples$

0 commit comments

Comments
 (0)