Skip to content

Commit 8b3680b

Browse files
at-watSean-Der
authored andcommittedJan 12, 2020
Upgrade golangci-lint to 1.19.1
Fix whitespace and stylecheck error. Disable godox.
1 parent 1bb35ee commit 8b3680b

13 files changed

+14
-16
lines changed
 

‎.golangci.yml

+9-4
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ linters-settings:
77
linters:
88
enable-all: true
99
disable:
10-
- maligned
11-
- lll
1210
- dupl
13-
- gocyclo
14-
- gochecknoglobals
1511
- funlen
12+
- gochecknoglobals
13+
- gocyclo
14+
- godox
15+
- lll
16+
- maligned
1617

1718
issues:
1819
exclude-use-default: false
@@ -22,6 +23,10 @@ issues:
2223
text: "L' should not be capitalized"
2324
linters:
2425
- gocritic
26+
- path: cipher_suite
27+
text: "should not use ALL_CAPS in Go names; use CamelCase instead"
28+
linters:
29+
- stylecheck
2530
- path: cipher_suite
2631
text: "don't use ALL_CAPS in Go names; use CamelCase"
2732
linters:

‎.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
include:
2020
- stage: lint
2121
before_script:
22-
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.18.0
22+
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.19.1
2323
install: skip
2424
script:
2525
- bash .github/assert-contributors.sh

‎change_cipher_spec_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,4 @@ func TestChangeCipherSpecInvalid(t *testing.T) {
2727
if err := c.Unmarshal([]byte{0x00}); err != errInvalidCipherSpec {
2828
t.Errorf("ChangeCipherSpec invalid assert: got %#v, want %#v", err, errInvalidCipherSpec)
2929
}
30-
3130
}

‎cipher_suite_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ func TestDecodeCipherSuites(t *testing.T) {
2020
}
2121
// todo: compare result
2222
}
23-
2423
}

‎compression_method_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
)
66

77
func TestDecodeCompressionMethods(t *testing.T) {
8-
98
testCases := []struct {
109
buf []byte
1110
result []*compressionMethod
@@ -21,5 +20,4 @@ func TestDecodeCompressionMethods(t *testing.T) {
2120
}
2221
// todo: compare result
2322
}
24-
2523
}

‎conn.go

-1
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,6 @@ func (c *Conn) notify(level alertLevel, desc alertDescription) error {
688688
}
689689

690690
return c.flushPacketBuffer()
691-
692691
}
693692

694693
func (c *Conn) setHandshakeCompletedSuccessfully() {

‎conn_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,6 @@ func TestPSK(t *testing.T) {
255255
ServerIdentity: nil,
256256
},
257257
} {
258-
259258
clientIdentity := []byte("Client Identity")
260259
clientErr := make(chan error, 1)
261260

@@ -738,7 +737,6 @@ func TestExtendedMasterSecret(t *testing.T) {
738737
t.Errorf("Server error expected: \"%v\" but got \"%v\"", tt.expectedServerErr, err)
739738
}
740739
}
741-
742740
})
743741
}
744742
}
@@ -829,7 +827,6 @@ func TestServerCertificate(t *testing.T) {
829827
}
830828
})
831829
}
832-
833830
}
834831

835832
func TestCipherSuiteConfiguration(t *testing.T) {

‎dtls.go

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Package dtls implements Datagram Transport Layer Security (DTLS) 1.2
2+
package dtls

‎e2e/e2e_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ func TestPionE2ESimple(t *testing.T) {
205205
ConnectTimeout: dtls.ConnectTimeoutOption(2 * time.Second),
206206
}
207207
assertE2ECommunication(cfg, cfg, serverPort, t)
208-
209208
}
210209
}
211210

‎examples/util/util.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package util provides auxiliary utilities used in examples
12
package util
23

34
import (

‎extension_supported_point_formats_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
)
77

88
func TestExtensionSupportedPointFormats(t *testing.T) {
9-
109
rawExtensionSupportedPointFormats := []byte{0x00, 0x0b, 0x00, 0x02, 0x01, 0x00}
1110
parsedExtensionSupportedPointFormats := &extensionSupportedPointFormats{
1211
pointFormats: []ellipticCurvePointFormat{ellipticCurvePointFormatUncompressed},

‎extension_supported_signature_algorithms_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
)
77

88
func TestExtensionSupportedSignatureAlgorithms(t *testing.T) {
9-
109
rawExtensionSupportedSignatureAlgorithms := []byte{
1110
0x00, 0x0d,
1211
0x00, 0x08,

‎internal/udp/conn.go

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package udp provides a connection-oriented listener over a UDP PacketConn
12
package udp
23

34
import (

0 commit comments

Comments
 (0)