mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-10 18:16:07 +00:00
linter: (1/2) enable errcheck (#5064)
## Description
partially cleanup in preparation for errcheck
i ignored a bunch of defer errors in tests but with the update to go 1.14 we can use `t.Cleanup(func() { if err := <>; err != nil {..}}` to cover those errors, I will do this in pr number two of enabling errcheck.
ref #5059
This commit is contained in:
@@ -56,7 +56,7 @@ func testStream(t *testing.T, app types.Application) {
|
||||
if err := server.Start(); err != nil {
|
||||
require.NoError(t, err, "Error starting socket server")
|
||||
}
|
||||
defer server.Stop()
|
||||
defer server.Stop() //nolint:errcheck // ignore for tests
|
||||
|
||||
// Connect to the socket
|
||||
client := abcicli.NewSocketClient(socket, false)
|
||||
@@ -64,7 +64,7 @@ func testStream(t *testing.T, app types.Application) {
|
||||
if err := client.Start(); err != nil {
|
||||
t.Fatalf("Error starting socket client: %v", err.Error())
|
||||
}
|
||||
defer client.Stop()
|
||||
defer client.Stop() //nolint:errcheck // ignore for tests
|
||||
|
||||
done := make(chan struct{})
|
||||
counter := 0
|
||||
@@ -132,7 +132,7 @@ func testGRPCSync(t *testing.T, app types.ABCIApplicationServer) {
|
||||
if err := server.Start(); err != nil {
|
||||
t.Fatalf("Error starting GRPC server: %v", err.Error())
|
||||
}
|
||||
defer server.Stop()
|
||||
defer server.Stop() //nolint:errcheck // ignore for tests
|
||||
|
||||
// Connect to the socket
|
||||
conn, err := grpc.Dial(socket, grpc.WithInsecure(), grpc.WithContextDialer(dialerFunc))
|
||||
|
||||
Reference in New Issue
Block a user