Skip to content

Commit 46c2ed3

Browse files
authored
Fix revive CI issues (#763)
1 parent 32f1b19 commit 46c2ed3

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

integrations.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func (mi *modulesIntegration) SetupOnce(client *Client) {
2727
client.AddEventProcessor(mi.processor)
2828
}
2929

30-
func (mi *modulesIntegration) processor(event *Event, hint *EventHint) *Event {
30+
func (mi *modulesIntegration) processor(event *Event, _ *EventHint) *Event {
3131
if len(event.Modules) == 0 {
3232
mi.once.Do(func() {
3333
info, ok := debug.ReadBuildInfo()
@@ -70,7 +70,7 @@ func (ei *environmentIntegration) SetupOnce(client *Client) {
7070
client.AddEventProcessor(ei.processor)
7171
}
7272

73-
func (ei *environmentIntegration) processor(event *Event, hint *EventHint) *Event {
73+
func (ei *environmentIntegration) processor(event *Event, _ *EventHint) *Event {
7474
// Initialize maps as necessary.
7575
contextNames := []string{"device", "os", "runtime"}
7676
if event.Contexts == nil {
@@ -135,7 +135,7 @@ func (iei *ignoreErrorsIntegration) SetupOnce(client *Client) {
135135
client.AddEventProcessor(iei.processor)
136136
}
137137

138-
func (iei *ignoreErrorsIntegration) processor(event *Event, hint *EventHint) *Event {
138+
func (iei *ignoreErrorsIntegration) processor(event *Event, _ *EventHint) *Event {
139139
suspects := getIgnoreErrorsSuspects(event)
140140

141141
for _, suspect := range suspects {
@@ -195,7 +195,7 @@ func (iei *ignoreTransactionsIntegration) SetupOnce(client *Client) {
195195
client.AddEventProcessor(iei.processor)
196196
}
197197

198-
func (iei *ignoreTransactionsIntegration) processor(event *Event, hint *EventHint) *Event {
198+
func (iei *ignoreTransactionsIntegration) processor(event *Event, _ *EventHint) *Event {
199199
suspect := event.Transaction
200200
if suspect == "" {
201201
return event
@@ -233,7 +233,7 @@ func (cfi *contextifyFramesIntegration) SetupOnce(client *Client) {
233233
client.AddEventProcessor(cfi.processor)
234234
}
235235

236-
func (cfi *contextifyFramesIntegration) processor(event *Event, hint *EventHint) *Event {
236+
func (cfi *contextifyFramesIntegration) processor(event *Event, _ *EventHint) *Event {
237237
// Range over all exceptions
238238
for _, ex := range event.Exception {
239239
// If it has no stacktrace, just bail out
@@ -353,7 +353,7 @@ func (ti *globalTagsIntegration) SetupOnce(client *Client) {
353353
client.AddEventProcessor(ti.processor)
354354
}
355355

356-
func (ti *globalTagsIntegration) processor(event *Event, hint *EventHint) *Event {
356+
func (ti *globalTagsIntegration) processor(event *Event, _ *EventHint) *Event {
357357
if len(ti.tags) == 0 && len(ti.envTags) == 0 {
358358
return event
359359
}

internal/testutils/asserts.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func formatUnequalValues(got, want interface{}) string {
7474
return fmt.Sprintf("\ngot: %s\nwant: %s", a, b)
7575
}
7676

77-
func AssertBaggageStringsEqual(t *testing.T, got, want string, userMessage ...interface{}) {
77+
func AssertBaggageStringsEqual(t *testing.T, got, want string) {
7878
t.Helper()
7979

8080
baggageGot, err := baggage.Parse(got)

martini/sentrymartini.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func New(options Options) martini.Handler {
4444
}).handle
4545
}
4646

47-
func (h *handler) handle(rw http.ResponseWriter, r *http.Request, ctx martini.Context) {
47+
func (h *handler) handle(_ http.ResponseWriter, r *http.Request, ctx martini.Context) {
4848
hub := sentry.GetHubFromContext(r.Context())
4949
if hub == nil {
5050
hub = sentry.CurrentHub().Clone()

mocks_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ type ScopeMock struct {
1010
shouldDropEvent bool
1111
}
1212

13-
func (scope *ScopeMock) AddBreadcrumb(breadcrumb *Breadcrumb, limit int) {
13+
func (scope *ScopeMock) AddBreadcrumb(breadcrumb *Breadcrumb, _ int) {
1414
scope.breadcrumb = breadcrumb
1515
}
1616

17-
func (scope *ScopeMock) ApplyToEvent(event *Event, hint *EventHint) *Event {
17+
func (scope *ScopeMock) ApplyToEvent(event *Event, _ *EventHint) *Event {
1818
if scope.shouldDropEvent {
1919
return nil
2020
}
@@ -27,14 +27,14 @@ type TransportMock struct {
2727
lastEvent *Event
2828
}
2929

30-
func (t *TransportMock) Configure(options ClientOptions) {}
30+
func (t *TransportMock) Configure(_ ClientOptions) {}
3131
func (t *TransportMock) SendEvent(event *Event) {
3232
t.mu.Lock()
3333
defer t.mu.Unlock()
3434
t.events = append(t.events, event)
3535
t.lastEvent = event
3636
}
37-
func (t *TransportMock) Flush(timeout time.Duration) bool {
37+
func (t *TransportMock) Flush(_ time.Duration) bool {
3838
return true
3939
}
4040
func (t *TransportMock) Events() []*Event {

scope_concurrency_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/getsentry/sentry-go"
1010
)
1111

12-
func TestConcurrentScopeUsage(t *testing.T) {
12+
func TestConcurrentScopeUsage(_ *testing.T) {
1313
var wg sync.WaitGroup
1414

1515
for i := 0; i < 10; i++ {

tracing_test.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ func TestContinueSpanFromTrace(t *testing.T) {
587587
}
588588
}
589589

590-
func TestSpanFromContext(t *testing.T) {
590+
func TestSpanFromContext(_ *testing.T) {
591591
// SpanFromContext always returns a non-nil value, such that you can use
592592
// it without nil checks.
593593
// When no span was in the context, the returned value is a no-op.
@@ -697,7 +697,7 @@ func TestSample(t *testing.T) {
697697
}
698698
}
699699

700-
func TestDoesNotCrashWithEmptyContext(t *testing.T) {
700+
func TestDoesNotCrashWithEmptyContext(_ *testing.T) {
701701
// This test makes sure that we can still start and finish transactions
702702
// with empty context (for example, when Sentry SDK is not initialized)
703703
ctx := context.Background()
@@ -884,7 +884,7 @@ func TestSpanSetContextOverrides(t *testing.T) {
884884
// This test checks that there are no concurrent reads/writes to
885885
// substructures in scope.contexts.
886886
// See https://github.com/getsentry/sentry-go/issues/570 for more details.
887-
func TestConcurrentContextAccess(t *testing.T) {
887+
func TestConcurrentContextAccess(_ *testing.T) {
888888
ctx := NewTestContext(ClientOptions{
889889
EnableTracing: true,
890890
TracesSampleRate: 1,
@@ -973,7 +973,7 @@ func TestAdjustingTransactionSourceBeforeSending(t *testing.T) {
973973
// This is a regression test for https://github.com/getsentry/sentry-go/issues/587
974974
// Without the "spans can be finished only once" fix, this test will fail
975975
// when run with race detection ("-race").
976-
func TestSpanFinishConcurrentlyWithoutRaces(t *testing.T) {
976+
func TestSpanFinishConcurrentlyWithoutRaces(_ *testing.T) {
977977
ctx := NewTestContext(ClientOptions{
978978
EnableTracing: true,
979979
TracesSampleRate: 1,

0 commit comments

Comments
 (0)