You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This changes the CI / release builds to use the latest Go version. It also
upgrades golangci-lint to a newer version compatible with Go 1.19.
In Go 1.19, godoc has gained official support for links and lists. The
syntax for code blocks in doc comments has changed and now requires a
leading tab character. gofmt adapts comments to the new syntax
automatically, so there are a lot of comment re-formatting changes in this
PR. We need to apply the new format in order to pass the CI lint stage with
Go 1.19.
With the linter upgrade, I have decided to disable 'gosec' - it produces
too many false-positive warnings. The 'deadcode' and 'varcheck' linters
have also been removed because golangci-lint warns about them being
unmaintained. 'unused' provides similar coverage and we already have it
enabled, so we don't lose much with this change.
Copy file name to clipboardexpand all lines: .golangci.yml
+4-13
Original file line number
Diff line number
Diff line change
@@ -12,22 +12,19 @@ run:
12
12
linters:
13
13
disable-all: true
14
14
enable:
15
-
- deadcode
16
15
- goconst
17
16
- goimports
18
17
- gosimple
19
18
- govet
20
19
- ineffassign
21
20
- misspell
22
21
- unconvert
23
-
- varcheck
24
22
- typecheck
25
23
- unused
26
24
- staticcheck
27
25
- bidichk
28
26
- durationcheck
29
27
- exportloopref
30
-
- gosec
31
28
- whitespace
32
29
33
30
# - structcheck # lots of false positives
@@ -45,11 +42,6 @@ linters-settings:
45
42
goconst:
46
43
min-len: 3# minimum length of string constant
47
44
min-occurrences: 6# minimum number of occurrences
48
-
gosec:
49
-
excludes:
50
-
- G404# Use of weak random number generator - lots of FP
51
-
- G107# Potential http request -- those are intentional
52
-
- G306# G306: Expect WriteFile permissions to be 0600 or less
53
45
54
46
issues:
55
47
exclude-rules:
@@ -58,16 +50,15 @@ issues:
58
50
- deadcode
59
51
- staticcheck
60
52
- path: internal/build/pgp.go
61
-
text: 'SA1019: package golang.org/x/crypto/openpgp is deprecated'
53
+
text: 'SA1019: "golang.org/x/crypto/openpgp" is deprecated: this package is unmaintained except for security fixes.'
62
54
- path: core/vm/contracts.go
63
-
text: 'SA1019: package golang.org/x/crypto/ripemd160 is deprecated'
55
+
text: 'SA1019: "golang.org/x/crypto/ripemd160" is deprecated: RIPEMD-160 is a legacy hash and should not be used for new applications.'
64
56
- path: accounts/usbwallet/trezor.go
65
-
text: 'SA1019: package github.com/golang/protobuf/proto is deprecated'
57
+
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
66
58
- path: accounts/usbwallet/trezor/
67
-
text: 'SA1019: package github.com/golang/protobuf/proto is deprecated'
59
+
text: 'SA1019: "github.com/golang/protobuf/proto" is deprecated: Use the "google.golang.org/protobuf/proto" package instead.'
68
60
exclude:
69
61
- 'SA1019: event.TypeMux is deprecated: use Feed'
70
62
- 'SA1019: strings.Title is deprecated'
71
63
- 'SA1019: strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly. Use golang.org/x/text/cases instead.'
72
64
- 'SA1029: should not use built-in type string as key for value'
73
-
- 'G306: Expect WriteFile permissions to be 0600 or less'
0 commit comments