Skip to content

Commit

Permalink
Fix remaining lint issues incl. ignore io/ioutil deprecation warnings
Browse files Browse the repository at this point in the history
io/ioutil touches a large amount of the codebase so is a not-insignificant change to remedy. For now ignore these lint errors as ioutil now only operates as a simple delegate for the preferred os and io packages anyway.
If we want to correctly resolve these lint issues, upstream PR ethereum/go-ethereum#24869 can provide guidance.
  • Loading branch information
chris-j-h committed May 3, 2024
1 parent b61cb25 commit 4c3f064
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@ issues:
- 'SA1019: strings.Title is deprecated'
- '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.'
- 'SA1029: should not use built-in type string as key for value'
# quorum: ignore due to large number of changes required to remedy. ioutil now only operates as a simple delegate for the preferred os and io packages anyway.
# If we want to correctly resolve these lint issues, upstream PR https://github.com/ethereum/go-ethereum/pull/24869 can provide guidance.
- 'SA1019: "io/ioutil" has been deprecated since Go 1.19: As of Go 1.16, the same functionality is now provided by package .io. or package .os., and those implementations should be preferred in new code. See the specific function documentation for details.'
1 change: 0 additions & 1 deletion plugin/security/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func transform(tlsData *proto.TLSConfiguration_Data) (*tls.Config, error) {
cipherSuites = defaultCipherSuites
}
tlsConfig.CipherSuites = cipherSuites
tlsConfig.PreferServerCipherSuites = true

cer, err := tls.X509KeyPair(tlsData.GetCertPem(), tlsData.GetKeyPem())
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion plugin/security/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func TestTransform_whenTypical(t *testing.T) {
cfg, err := transform(abitraryTLSConfigurationData)

assert.NoError(err)
assert.True(cfg.PreferServerCipherSuites)
assert.EqualValues(defaultCipherSuites, cfg.CipherSuites)
assert.Equal(uint16(tls.VersionTLS12), cfg.MinVersion)
assert.EqualValues([]tls.CurveID{
Expand Down

0 comments on commit 4c3f064

Please sign in to comment.