Upgrade the linter to golangci-lint@v1.55.1

The unused-parameter linter became stricter, so we adjust it to
allow unused params that start with underscore. It can be nice to keep
unused param names when implementing an interface sometimes, to help
readers understand why it is unused in that particular implementation.
This commit is contained in:
Ryan Richard
2023-11-02 09:54:16 -07:00
parent 3c2d921300
commit 29e939db7f
12 changed files with 86 additions and 78 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2020-2022 the Pinniped contributors. All Rights Reserved.
// Copyright 2020-2023 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package testutil
@@ -37,7 +37,7 @@ func (log *TranscriptLogger) Transcript() []TranscriptLogMessage {
return result
}
func (log *TranscriptLogger) Info(level int, msg string, keysAndValues ...interface{}) {
func (log *TranscriptLogger) Info(_level int, msg string, keysAndValues ...interface{}) {
log.lock.Lock()
defer log.lock.Unlock()
log.transcript = append(log.transcript, TranscriptLogMessage{
@@ -55,7 +55,7 @@ func (log *TranscriptLogger) Error(_ error, msg string, _ ...interface{}) {
})
}
func (log *TranscriptLogger) Enabled(level int) bool {
func (log *TranscriptLogger) Enabled(_level int) bool {
return true
}
@@ -71,4 +71,4 @@ func (log *TranscriptLogger) WithValues(_ ...interface{}) logr.LogSink {
return log
}
func (log *TranscriptLogger) Init(info logr.RuntimeInfo) {}
func (log *TranscriptLogger) Init(_info logr.RuntimeInfo) {}