From 1a31e9a96be41b39fc2dda5f274a692fcc69a2c6 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Tue, 18 May 2021 16:09:23 +0800 Subject: [PATCH] Ignore staticcheck lint in test --- internal/spinlock_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/spinlock_test.go b/internal/spinlock_test.go index 577037f..168010b 100644 --- a/internal/spinlock_test.go +++ b/internal/spinlock_test.go @@ -52,6 +52,7 @@ func BenchmarkMutex(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { m.Lock() + //nolint:staticcheck m.Unlock() } }) @@ -62,6 +63,7 @@ func BenchmarkSpinLock(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { spin.Lock() + //nolint:staticcheck spin.Unlock() } }) @@ -72,6 +74,7 @@ func BenchmarkBackOffSpinLock(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { spin.Lock() + //nolint:staticcheck spin.Unlock() } })