Skip to content

Commit f05ff22

Browse files
committed
Skip staticcheck for pubsub
1 parent 39fc4c1 commit f05ff22

5 files changed

Lines changed: 9 additions & 0 deletions

File tree

pkg/source/pubsub/pubsub_source.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"fmt"
1717
"time"
1818

19+
// nolint: staticcheck
1920
"cloud.google.com/go/pubsub"
2021
"github.com/google/uuid"
2122
"github.com/pkg/errors"

pkg/target/pubsub.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"fmt"
1717
"time"
1818

19+
// nolint: staticcheck
1920
"cloud.google.com/go/pubsub"
2021
"github.com/hashicorp/go-multierror"
2122
"github.com/pkg/errors"

pkg/target/pubsub_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/sirupsen/logrus"
2222
"github.com/stretchr/testify/assert"
2323

24+
// nolint: govet,staticcheck
2425
pubsubV1 "cloud.google.com/go/pubsub/apiv1/pubsubpb"
2526
"google.golang.org/grpc/codes"
2627

@@ -180,6 +181,7 @@ func TestPubSubTarget_WriteSuccessWithMocks(t *testing.T) {
180181
assert.Nil(twres.Invalid)
181182
assert.Nil(err)
182183

184+
// nolint: staticcheck
183185
res, pullErr := srv.GServer.Pull(t.Context(), &pubsubV1.PullRequest{
184186
Subscription: "projects/project-test/subscriptions/test-sub",
185187
MaxMessages: 15, // 15 max messages to ensure we don't miss dupes

pkg/testutil/pubsub_helpers.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ import (
2020
"testing"
2121
"time"
2222

23+
// nolint: staticcheck
2324
"cloud.google.com/go/pubsub"
2425
"cloud.google.com/go/pubsub/pstest"
2526
"github.com/pkg/errors"
2627

28+
// nolint: staticcheck
2729
pubsubV1 "cloud.google.com/go/pubsub/apiv1/pubsubpb"
2830
"google.golang.org/grpc"
2931
"google.golang.org/grpc/credentials/insecure"
@@ -41,11 +43,13 @@ func InitMockPubsubServer(port int, opts []pstest.ServerReactorOption, t *testin
4143
t.Fatal(err)
4244
}
4345

46+
// nolint: staticcheck
4447
_, err = srv.GServer.CreateTopic(ctx, &pubsubV1.Topic{Name: `projects/project-test/topics/test-topic`})
4548
if err != nil {
4649
t.Fatal(err)
4750
}
4851

52+
// nolint: staticcheck
4953
_, err = srv.GServer.CreateSubscription(ctx, &pubsubV1.Subscription{
5054
Name: "projects/project-test/subscriptions/test-sub",
5155
Topic: "projects/project-test/topics/test-topic",

release_test/e2e_target_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
"github.com/snowplow/snowbridge/v3/pkg/monitoring"
3535
"github.com/snowplow/snowbridge/v3/pkg/testutil"
3636

37+
// nolint: staticcheck
3738
"cloud.google.com/go/pubsub"
3839
"github.com/stretchr/testify/assert"
3940
)

0 commit comments

Comments
 (0)