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

HOSTEDCP-2176: Enable gosimple and govet linters in golangci-lint #5464

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bryan-cox
Copy link
Member

@bryan-cox bryan-cox commented Jan 23, 2025

What this PR does / why we need it:
This PR:

  • enables gosimple and govet linters in golangci-lint
  • fixes all issues found by gosimple and govet

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes HOSTEDCP-2176

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Copy link
Contributor

openshift-ci bot commented Jan 23, 2025

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/needs-area area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/testing Indicates the PR includes changes for e2e testing labels Jan 23, 2025
Copy link
Contributor

openshift-ci bot commented Jan 23, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: bryan-cox

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

The pull request process is described here

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/needs-area labels Jan 23, 2025
@bryan-cox bryan-cox force-pushed the golangci-lint-enable-linters branch from b2e5b2a to b4e70b7 Compare January 23, 2025 03:35
This commit enables gosimple in golangci-lint, which specializes in
simplifying code. More info on https://golangci-lint.run/usage/linters/.

Signed-off-by: Bryan Cox <[email protected]>
This commit fixes all of the gosimple issues found by golangci-lint.
@bryan-cox bryan-cox force-pushed the golangci-lint-enable-linters branch 2 times, most recently from 6739968 to ea39fe7 Compare January 23, 2025 03:40
This commit enables govet, which examines Go source
code and reports suspicious constructs.

Signed-off-by: Bryan Cox <[email protected]>
This commit fixes all the errors found by the linter, govet, run by
golangci-lint.

Signed-off-by: Bryan Cox <[email protected]>
@bryan-cox bryan-cox force-pushed the golangci-lint-enable-linters branch from ea39fe7 to c8d2c25 Compare January 23, 2025 03:41
@bryan-cox bryan-cox changed the title Golangci lint enable linters HOSTEDCP-2176: Enable gosimple and govet linters in golangci-lint Jan 23, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jan 23, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jan 23, 2025

@bryan-cox: This pull request references HOSTEDCP-2176 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target either version "4.19." or "openshift-4.19.", but it targets "4.18" instead.

In response to this:

What this PR does / why we need it:
This PR:

  • enables gosimple and govet linters in golangci-lint
  • fixes all issues found by gosimple and govet

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes HOSTEDCP-2176

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@bryan-cox
Copy link
Member Author

/test all

@bryan-cox
Copy link
Member Author

/test verify

Copy link
Contributor

openshift-ci bot commented Jan 23, 2025

@bryan-cox: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/verify c8d2c25 link true /test verify
ci/prow/okd-scos-e2e-aws-ovn c8d2c25 link false /test okd-scos-e2e-aws-ovn

Full PR test history. Your PR dashboard.

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. area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/testing Indicates the PR includes changes for e2e testing do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants