Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore unparam linter #887

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ linters:
- gofumpt
- importas
- gci
# - unparam // https://github.com/golangci/golangci-lint/issues/3711
- unparam
- gosec

issues:
Expand Down
2 changes: 1 addition & 1 deletion hack/make/dep_golangci_lint.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $(call _assert_var,UNAME_ARCH)
$(call _assert_var,CACHE_VERSIONS)
$(call _assert_var,CACHE_BIN)

GOLANGCI_LINT_VERSION ?= 1.56.1
GOLANGCI_LINT_VERSION ?= 1.56.2

ARCH := $(UNAME_ARCH)
ifeq ($(UNAME_ARCH),x86_64)
Expand Down
2 changes: 1 addition & 1 deletion internal/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,6 @@ func errorHandler(logger logr.Logger, msg string) func(context.Context, http.Res
_ = json.NewEncoder(w).Encode(&errorMessage{RequestID: reqID})
}

logger.Error(err, "Service error.", "reqID", reqID, "ws", ws)
logger.Error(err, "Service error.", "reqID", reqID, "ws", ws, "msg", msg)
}
}
4 changes: 2 additions & 2 deletions internal/sftp/goclient_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

// pubkeyHandler returns a handler that checks the client's public key against
// the keys in the authorized_keys file.
func pubKeyHandler(t *testing.T, ctx ssh.Context, key ssh.PublicKey) bool {
func pubKeyHandler(t *testing.T, key ssh.PublicKey) bool {
file, err := os.Open("./testdata/authorized_keys")
if err != nil {
t.Fatalf("SFTP server: couldn't open authorized_keys file: %s", err)
Expand Down Expand Up @@ -108,7 +108,7 @@ func startSFTPServer(t *testing.T) (string, string) {
s.Write(authorizedKey)
},
PublicKeyHandler: func(ctx ssh.Context, key ssh.PublicKey) bool {
return pubKeyHandler(t, ctx, key)
return pubKeyHandler(t, key)
},
SubsystemHandlers: map[string]ssh.SubsystemHandler{
"sftp": sftpHandler,
Expand Down
Loading