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

🌱 Remove lint ignore for comments and unhandled errors #2383

Merged

Conversation

killianmuldoon
Copy link
Contributor

@killianmuldoon killianmuldoon commented Sep 25, 2023

Remove golangci-lint config related to skipping linters for comments across multiple packages. Fixed the finding by adding a number of comments across the codebase.

Part of #2058

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 25, 2023
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 25, 2023
@@ -268,25 +268,25 @@ issues:
- linters:
- revive
text: "package-comments"
path: ^(main|(packaging|apis|controllers|feature|test|pkg)\/.*)\.go$
path: ^(apis/(v1alpha3|v1alpha4)\/.*)\.go$
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left the ignore on these packages - they're going to be removed relatively soon so I think it's find to leave them as is instead of fixing them up.

@codecov
Copy link

codecov bot commented Sep 25, 2023

Codecov Report

Patch coverage: 57.14% and project coverage change: -0.16% ⚠️

Comparison is base (830aa85) 60.83% compared to head (653d6e9) 60.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2383      +/-   ##
==========================================
- Coverage   60.83%   60.67%   -0.16%     
==========================================
  Files         164      164              
  Lines        9469     9473       +4     
==========================================
- Hits         5760     5748      -12     
- Misses       3295     3307      +12     
- Partials      414      418       +4     
Files Changed Coverage Δ
apis/v1alpha3/vsphereclusteridentity_types.go 33.33% <ø> (ø)
apis/v1alpha4/vspherecluster_types.go 33.33% <ø> (ø)
apis/v1alpha4/vsphereclusteridentity_types.go 33.33% <ø> (ø)
apis/v1beta1/types.go 50.00% <ø> (ø)
apis/v1beta1/vspherecluster_types.go 100.00% <ø> (ø)
apis/v1beta1/vsphereclusteridentity_types.go 100.00% <ø> (ø)
apis/v1beta1/vsphereclustertemplate_types.go 100.00% <ø> (ø)
apis/v1beta1/vspheredeploymentzone_types.go 100.00% <ø> (ø)
apis/v1beta1/vspherefailuredomain_types.go 100.00% <ø> (ø)
apis/v1beta1/vspheremachine_types.go 100.00% <ø> (ø)
... and 59 more

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 25, 2023
@killianmuldoon killianmuldoon changed the title 🌱 Remove lint ignore for comments 🌱 Remove lint ignore for comments and unhandled errors Sep 25, 2023
Copy link
Member

@chrischdi chrischdi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thx for this work.

A couple of nits :-)

apis/v1beta1/vsphereclusteridentity_types.go Outdated Show resolved Hide resolved
apis/vmware/v1beta1/vspherecluster_types.go Outdated Show resolved Hide resolved
pkg/constants/constants.go Outdated Show resolved Hide resolved
pkg/identity/identity.go Outdated Show resolved Hide resolved
pkg/services/govmomi/clustermodules/provider.go Outdated Show resolved Hide resolved
pkg/services/network/constants.go Outdated Show resolved Hide resolved
pkg/services/vimmachine.go Outdated Show resolved Hide resolved
pkg/services/vimmachine.go Outdated Show resolved Hide resolved
// This is also the name used by VSphereMachineTemplate and KubeadmConfigTemplate.
// TODO: (killianmuldoon) remove this.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice finding.

Is this TODO for this PR or a follow-up?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow up - I didn't want to complicate this PR 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this to avoid having to rebase

@chrischdi
Copy link
Member

/approve

Wow that was very quick 😂

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrischdi

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 Sep 25, 2023
@killianmuldoon
Copy link
Contributor Author

killianmuldoon commented Sep 25, 2023

/hold

For squash

@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 Sep 25, 2023
Signed-off-by: killianmuldoon <[email protected]>
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Sep 25, 2023

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

Test name Commit Details Required Rerun command
pull-cluster-api-provider-vsphere-apidiff-main 653d6e9 link false /test pull-cluster-api-provider-vsphere-apidiff-main

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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/test-infra repository. I understand the commands that are listed here.

@killianmuldoon
Copy link
Contributor Author

/hold cancel

@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 Sep 25, 2023
@chrischdi
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 25, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 1d956629e806e739ff75c01a9da2e422506aacdf

@k8s-ci-robot k8s-ci-robot merged commit 6287964 into kubernetes-sigs:main Sep 25, 2023
9 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Sep 25, 2023
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants