Merge pull request #789 from vmware-tanzu/remove_unparam_linter

Remove `unparam` linter
This commit is contained in:
Ryan Richard 2021-08-19 10:55:04 -07:00 committed by GitHub
commit c4727d57c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 4 deletions

View File

@ -47,7 +47,6 @@ linters:
- scopelint - scopelint
- sqlclosecheck - sqlclosecheck
- unconvert - unconvert
- unparam
- whitespace - whitespace
issues: issues:

View File

@ -644,7 +644,6 @@ func authenticatorAPIGroup(apiGroup string) withFunc {
} }
} }
//nolint:unparam // the apiGroupSuffix parameter might always be the same, but this is nice for test readability
func replaceGV(t *testing.T, baseGV schema.GroupVersion, apiGroupSuffix string) schema.GroupVersion { func replaceGV(t *testing.T, baseGV schema.GroupVersion, apiGroupSuffix string) schema.GroupVersion {
t.Helper() t.Helper()
groupName, ok := Replace(baseGV.Group, apiGroupSuffix) groupName, ok := Replace(baseGV.Group, apiGroupSuffix)

View File

@ -238,7 +238,7 @@ func TestLogin(t *testing.T) { // nolint:gocyclo
formPostProviderMux.HandleFunc("/.well-known/openid-configuration", discoveryHandler(formPostSuccessServer, []string{"query", "form_post"})) formPostProviderMux.HandleFunc("/.well-known/openid-configuration", discoveryHandler(formPostSuccessServer, []string{"query", "form_post"}))
formPostProviderMux.HandleFunc("/token", tokenHandler) formPostProviderMux.HandleFunc("/token", tokenHandler)
defaultDiscoveryResponse := func(req *http.Request) (*http.Response, error) { // nolint:unparam defaultDiscoveryResponse := func(req *http.Request) (*http.Response, error) {
// Call the handler function from the test server to calculate the response. // Call the handler function from the test server to calculate the response.
handler, _ := providerMux.Handler(req) handler, _ := providerMux.Handler(req)
recorder := httptest.NewRecorder() recorder := httptest.NewRecorder()
@ -246,7 +246,7 @@ func TestLogin(t *testing.T) { // nolint:gocyclo
return recorder.Result(), nil return recorder.Result(), nil
} }
defaultLDAPTestOpts := func(t *testing.T, h *handlerState, authResponse *http.Response, authError error) error { // nolint:unparam defaultLDAPTestOpts := func(t *testing.T, h *handlerState, authResponse *http.Response, authError error) error {
h.generateState = func() (state.State, error) { return "test-state", nil } h.generateState = func() (state.State, error) { return "test-state", nil }
h.generatePKCE = func() (pkce.Code, error) { return "test-pkce", nil } h.generatePKCE = func() (pkce.Code, error) { return "test-pkce", nil }
h.generateNonce = func() (nonce.Nonce, error) { return "test-nonce", nil } h.generateNonce = func() (nonce.Nonce, error) { return "test-nonce", nil }