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 <huy@perun.network>
  • Loading branch information
NhoxxKienn committed Feb 29, 2024
1 parent 03670eb commit 6327b5d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@ jobs:
with:
go-version: ${{ env.go-version }}

- name: Copy .golangci.yml
run: cp ../../.golangci.yml .

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

- name: Lint proto files
uses: plexsystems/protolint-action@v0.7.0
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 6327b5d

Please sign in to comment.