Skip to content

Commit 939c831

Browse files
committed
tests: keep default
1 parent 28aea6f commit 939c831

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//golangcitest:args -Espancheck
2+
//golangcitest:config_path testdata/spancheck_keep_default.yml
3+
package spancheck
4+
5+
import (
6+
"context"
7+
8+
"go.opentelemetry.io/otel"
9+
"go.opentelemetry.io/otel/trace"
10+
)
11+
12+
func StartTrace() (context.Context, trace.Span) {
13+
return otel.Tracer("example.com/main").Start(context.Background(), "span name") // want "span is unassigned, probable memory leak"
14+
}
15+
16+
func _() {
17+
_, _ = StartTrace()
18+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
linters-settings:
2+
spancheck:
3+
extra-start-span-signatures:
4+
- dummy:opentelemetry

0 commit comments

Comments
 (0)