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

✨ Enable additional linters and metalinter checks. Fix findings #1359

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

oscr
Copy link
Contributor

@oscr oscr commented Oct 17, 2022

What this PR does / why we need it:

As discussed in #1342, this pr enables some additional linters that are also active in capi.

Enable new linters:

  • asasalint
  • bidichk
  • dupword

Enable gocritic checks:

  • diagnostic
  • experimental
  • performance

Fixes the findings

test/e2e/shared/context.go:85:2: Duplicate words (the) found (dupword)
	// BootstrapClusterProvider manages provisioning of the the bootstrap cluster to be used for the e2e tests.
	^
controllers/openstackmachine_controller.go:541:15: dynamicFmtString: use errors.New(string(err)) or fmt.Errorf("%s", string(err)) instead (gocritic)
	logger.Error(fmt.Errorf(string(err)), message.Error())
	             ^
controllers/openstackmachine_controller.go:424:6: emptyStringTest: replace `len(fp.PortID) != 0` with `fp.PortID != ""` (gocritic)
		if len(fp.PortID) != 0 {
		   ^
test/e2e/shared/context.go:40:2: commentedOutCode: may want to remove commented-out code (gocritic)
	// ctx.Lifecycle = DefaultGinkgoLifecycle()
	^

/hold

Enable new linters: asasalint, bidichk, dupword
Enable gocritic checks: diagnostic, experimental, performance
@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 17, 2022
@netlify
Copy link

netlify bot commented Oct 17, 2022

Deploy Preview for kubernetes-sigs-cluster-api-openstack ready!

Name Link
🔨 Latest commit 10f36f0
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-cluster-api-openstack/deploys/634d1b34579e970008a620ed
😎 Deploy Preview https://deploy-preview-1359--kubernetes-sigs-cluster-api-openstack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 17, 2022
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 17, 2022
@jichenjc
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 17, 2022
@tobiasgiese
Copy link
Member

/approve

Thanks for the quick implementation @oscr! 🙂

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: oscr, tobiasgiese

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 17, 2022
@oscr
Copy link
Contributor Author

oscr commented Oct 17, 2022

Formality question: who and when removes the hold? Am I expected to remove it? Because in earlier prs I've let the reviewers remove it, but I don't want to put more work on the reviewers than needed.

@jichenjc
Copy link
Contributor

/hold cancel

usually it's a process to let more reviewers review for complicated PR
this should good enough and no need further review :)

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 17, 2022
@k8s-ci-robot k8s-ci-robot merged commit 505b5d2 into kubernetes-sigs:main Oct 17, 2022
@oscr oscr deleted the enable-more-linters branch October 17, 2022 11:33
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants