ci: disable the unparam linter for tests (#4738)

This commit is contained in:
Marten Seemann
2024-12-01 12:27:32 +08:00
committed by GitHub
parent 2e4cef10ab
commit aed4d8df0c
5 changed files with 1 additions and 4 deletions

View File

@@ -44,3 +44,4 @@ issues:
linters: linters:
- exhaustive - exhaustive
- prealloc - prealloc
- unparam

View File

@@ -26,7 +26,6 @@ var _ = AfterEach(func() {
mockCtrl.Finish() mockCtrl.Finish()
}) })
//nolint:unparam
func scaleDuration(t time.Duration) time.Duration { func scaleDuration(t time.Duration) time.Duration {
scaleFactor := 1 scaleFactor := 1
if f, err := strconv.Atoi(os.Getenv("TIMESCALE_FACTOR")); err == nil { // parsing "" errors, so this works fine if the env is not set if f, err := strconv.Atoi(os.Getenv("TIMESCALE_FACTOR")); err == nil { // parsing "" errors, so this works fine if the env is not set

View File

@@ -329,7 +329,6 @@ func TestRejectFrequentKeyUpdates(t *testing.T) {
}, err) }, err)
} }
//nolint:unparam
func setKeyUpdateIntervals(t *testing.T, firstKeyUpdateInterval, keyUpdateInterval uint64) { func setKeyUpdateIntervals(t *testing.T, firstKeyUpdateInterval, keyUpdateInterval uint64) {
origKeyUpdateInterval := KeyUpdateInterval origKeyUpdateInterval := KeyUpdateInterval
origFirstKeyUpdateInterval := FirstKeyUpdateInterval origFirstKeyUpdateInterval := FirstKeyUpdateInterval

View File

@@ -109,7 +109,6 @@ func TestServerConfigGetConfigForClientRecursively(t *testing.T) {
var localAddr, remoteAddr net.Addr var localAddr, remoteAddr net.Addr
tlsConf := &tls.Config{} tlsConf := &tls.Config{}
var innerConf *tls.Config var innerConf *tls.Config
//nolint:unparam
getCert := func(info *tls.ClientHelloInfo) (*tls.Certificate, error) { getCert := func(info *tls.ClientHelloInfo) (*tls.Certificate, error) {
localAddr = info.Conn.LocalAddr() localAddr = info.Conn.LocalAddr()
remoteAddr = info.Conn.RemoteAddr() remoteAddr = info.Conn.RemoteAddr()

View File

@@ -11,7 +11,6 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
//nolint:unparam
func scaleDuration(t time.Duration) time.Duration { func scaleDuration(t time.Duration) time.Duration {
scaleFactor := 1 scaleFactor := 1
if f, err := strconv.Atoi(os.Getenv("TIMESCALE_FACTOR")); err == nil { // parsing "" errors, so this works fine if the env is not set if f, err := strconv.Atoi(os.Getenv("TIMESCALE_FACTOR")); err == nil { // parsing "" errors, so this works fine if the env is not set