Skip to content

Conversation

@christophermancini
Copy link
Contributor

Enable the unparam linter to detect unused function parameters and return values that are never used or always return the same value.

The unparam linter identifies:

  • Function parameters that are never used in the function body
  • Function parameters that always receive the same constant value
  • Return values that are never used by callers
  • Return values that always return the same value (e.g., always nil)

This helps reduce code complexity, improve readability, and make function signatures more accurate by removing unnecessary elements.

Changes:

  • Enable unparam linter in .golangci.yml
  • Remove always-nil error return from findJUnitFiles()
  • Remove unused startIdx parameter from extractFailureBlocks() (always 0)
  • Remove unused namespace parameter from pod() test helper (always ns1)
  • Remove always-empty image return from getUpgradeVersion()
  • Remove unused ctx parameter from runUpgrade()
  • Remove unused ns and kind parameters from createRolebinding() (always constants)
  • Remove always-nil error returns from manageSecrets() and manageSubscriptions()
  • Remove unused second int return from queryPrometheusAlerts()
  • Remove unused action parameter from osdClusterReadyHealthCheck()

This is Stage 1 of a phased golangci-lint rollout plan to incrementally improve code quality across the codebase.

Enable the `unparam` linter to detect unused function parameters and return values that are never used or always return the same value.

The unparam linter identifies:
- Function parameters that are never used in the function body
- Function parameters that always receive the same constant value
- Return values that are never used by callers
- Return values that always return the same value (e.g., always nil)

This helps reduce code complexity, improve readability, and make function signatures more accurate by removing unnecessary elements.

Changes:
- Enable unparam linter in .golangci.yml
- Remove always-nil error return from findJUnitFiles()
- Remove unused startIdx parameter from extractFailureBlocks() (always 0)
- Remove unused namespace parameter from pod() test helper (always ns1)
- Remove always-empty image return from getUpgradeVersion()
- Remove unused ctx parameter from runUpgrade()
- Remove unused ns and kind parameters from createRolebinding() (always constants)
- Remove always-nil error returns from manageSecrets() and manageSubscriptions()
- Remove unused second int return from queryPrometheusAlerts()
- Remove unused action parameter from osdClusterReadyHealthCheck()

This is Stage 1 of a phased golangci-lint rollout plan to incrementally improve code quality across the codebase.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@openshift-ci openshift-ci bot requested review from abyrne55 and ritmun February 10, 2026 15:47
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 10, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christophermancini

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 10, 2026
@varunraokadaparthi
Copy link
Contributor

/test hypershift-pr-check

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 11, 2026

@christophermancini: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants