Skip to content

Commit

Permalink
Disable unparam linting on test files
Browse files Browse the repository at this point in the history
Parameters getting the same value in all (current) uses isn't
significant.

Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt committed Feb 13, 2024
1 parent 9752fb3 commit d236364
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,5 @@ issues:
linters:
- gochecknoinits
- goerr113
- unparam
- wrapcheck
2 changes: 0 additions & 2 deletions coredns/plugin/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,6 @@ func (t *handlerTestDriver) executeTestCase(rec *dnstest.Recorder, tc test.Case)
}
}

//nolint:unparam // `name` always receives `service1'.
func newServiceImport(namespace, name string, siType mcsv1a1.ServiceImportType) *mcsv1a1.ServiceImport {
return &mcsv1a1.ServiceImport{
ObjectMeta: metav1.ObjectMeta{
Expand All @@ -1005,7 +1004,6 @@ func newServiceImport(namespace, name string, siType mcsv1a1.ServiceImportType)
}
}

//nolint:unparam // `namespace` always receives `namespace1`.
func newEndpointSlice(namespace, name, clusterID string, ports []mcsv1a1.ServicePort, endpoints ...discovery.Endpoint,
) *discovery.EndpointSlice {
epPorts := make([]discovery.EndpointPort, len(ports))
Expand Down

0 comments on commit d236364

Please sign in to comment.