Skip to content

Commit

Permalink
chore(ci): fix code for ci linter
Browse files Browse the repository at this point in the history
Signed-off-by: Minh Huy Tran <[email protected]>
  • Loading branch information
NhoxxKienn committed Feb 29, 2024
1 parent 03670eb commit 645dec3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:
uses: actions/setup-go@v4
with:
go-version: ${{ env.go-version }}

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55
version: v1.56.2

- name: Lint proto files
uses: plexsystems/[email protected]
Expand Down
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ linters:
- scopelint
- golint
- interfacer
- varcheck
- structcheck
- deadcode

linters-settings:
cyclop:
Expand Down
2 changes: 0 additions & 2 deletions wire/net/endpoint_registry_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,6 @@ func nilConsumer(wire.Address) wire.Consumer { return nil }
// dialed in the background. It also tests that the dialing process combines
// with the Listener, so that if a connection to a peer that is still being
// dialed comes in, the peer is assigned that connection.
//
//nolint:testify
func TestRegistry_Get(t *testing.T) {
t.Parallel()
rng := test.Prng(t)
Expand Down
6 changes: 3 additions & 3 deletions wire/net/simple/dialer_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ func TestDialer_Dial(t *testing.T) {
ct := test.NewConcurrent(t)
go ct.Stage("accept", func(rt test.ConcT) {
conn, err := l.Accept(ser)
require.NoError(t, err) //nolint: testifylint
require.NotNil(rt, conn) //nolint: testifylint
require.NoError(t, err) //nolint:testifylint
require.NotNil(rt, conn) //nolint:testifylint

re, err := conn.Recv()
require.NoError(t, err) //nolint: testifylint
require.NoError(t, err) //nolint:testifylint
assert.Equal(t, re, e)
})

Expand Down
6 changes: 3 additions & 3 deletions wire/net/test/connhub_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ func TestConnHub_Create(t *testing.T) {
go ctxtest.AssertTerminates(t, timeout, func() {
ct.Stage("accept", func(rt pkgtest.ConcT) {
conn, err := l.Accept(ser)
require.NoError(t, err) //nolint: testifylint
require.NotNil(rt, conn) //nolint: testifylint
require.NoError(t, conn.Send(wiretest.NewRandomEnvelope(rng, wire.NewPingMsg()))) //nolint: testifylint
require.NoError(t, err) //nolint:testifylint
require.NotNil(rt, conn) //nolint:testifylint
require.NoError(t, conn.Send(wiretest.NewRandomEnvelope(rng, wire.NewPingMsg()))) //nolint:testifylint
})
})

Expand Down

0 comments on commit 645dec3

Please sign in to comment.