Skip to content

Commit

Permalink
fix compiling with Go 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
blizzy78 committed Mar 29, 2022
1 parent d1118fe commit 4a5d369
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions testdata/src/conventional/conventional.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"testing"
)

// TODO: add *testing.F once we switch to Go 1.18

func Variable() {
var (
ctx context.Context
b *testing.B
f *testing.F
m *testing.M
pb *testing.PB
t *testing.T
Expand All @@ -22,7 +23,6 @@ func Variable() {
// fill
_ = ctx
_ = b
_ = f
_ = m
_ = pb
_ = t
Expand All @@ -31,7 +31,6 @@ func Variable() {

func Param(ctx context.Context,
b *testing.B,
f *testing.F,
m *testing.M,
pb *testing.PB,
t *testing.T,
Expand All @@ -43,7 +42,6 @@ func Param(ctx context.Context,
// fill
_ = ctx
_ = b
_ = f
_ = m
_ = pb
_ = t
Expand Down
6 changes: 2 additions & 4 deletions testdata/src/warnings/conventional.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ import (
"testing"
)

// TODO: add *testing.F once we switch to Go 1.18

func Variable_Conventional() {
var (
c2 context.Context // want `variable name 'c2' is too short for the scope of its usage`
b2 *testing.B // want `variable name 'b2' is too short for the scope of its usage`
f2 *testing.F // want `variable name 'f2' is too short for the scope of its usage`
m2 *testing.M // want `variable name 'm2' is too short for the scope of its usage`
p2 *testing.PB // want `variable name 'p2' is too short for the scope of its usage`
t2 *testing.T // want `variable name 't2' is too short for the scope of its usage`
Expand All @@ -22,7 +23,6 @@ func Variable_Conventional() {
// fill
_ = c2
_ = b2
_ = f2
_ = m2
_ = p2
_ = t2
Expand All @@ -31,7 +31,6 @@ func Variable_Conventional() {

func Param_Conventional(c2 context.Context, // want `parameter name 'c2' is too short for the scope of its usage`
b2 *testing.B, // want `parameter name 'b2' is too short for the scope of its usage`
f2 *testing.F, // want `parameter name 'f2' is too short for the scope of its usage`
m2 *testing.M, // want `parameter name 'm2' is too short for the scope of its usage`
p2 *testing.PB, // want `parameter name 'p2' is too short for the scope of its usage`
t2 *testing.T, // want `parameter name 't2' is too short for the scope of its usage`
Expand All @@ -43,7 +42,6 @@ func Param_Conventional(c2 context.Context, // want `parameter name 'c2' is too
// fill
_ = c2
_ = b2
_ = f2
_ = m2
_ = p2
_ = t2
Expand Down

0 comments on commit 4a5d369

Please sign in to comment.