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 nolint for gosec #2406

Merged
merged 1 commit into from
Sep 29, 2023

Conversation

Ankitasw
Copy link
Member

@Ankitasw Ankitasw commented Sep 29, 2023

What this PR does / why we need it:
Remove //nolint:gosec linter usage and provided comments for the usages where it's kept as is. Mainly, usage in tests are kept as is.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Part of #2384

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 29, 2023
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 29, 2023
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

Thanks!

I think there's a couple of places where we still have //nolint: gosec - could you add comments where they're missing explaining why we're using the tag?

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (e77d02c) 60.74% compared to head (aa1c75e) 60.89%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2406      +/-   ##
==========================================
+ Coverage   60.74%   60.89%   +0.14%     
==========================================
  Files         164      164              
  Lines        9475     9475              
==========================================
+ Hits         5756     5770      +14     
+ Misses       3302     3291      -11     
+ Partials      417      414       -3     
Files Coverage Δ
pkg/services/govmomi/vcenter/clone.go 55.01% <0.00%> (ø)

... and 5 files with indirect coverage changes

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

@Ankitasw Ankitasw changed the title Remove nolint for gosec 🌱 Remove nolint for gosec Sep 29, 2023
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

Thanks!

Let's add comments to other invocations of nolint:gosec explaining why they're used.

pkg/services/govmomi/vcenter/clone.go Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 29, 2023
Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

One last nit.

Copy link
Contributor

@killianmuldoon killianmuldoon left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve
/hold
For other reviews.
Thanks!

@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 29, 2023
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 29, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: 836457a07f91f3c01b77bbf9c7b2eb1a36411b95

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: killianmuldoon

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

/lgtm

/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 29, 2023
@k8s-ci-robot k8s-ci-robot merged commit cdbdab3 into kubernetes-sigs:main Sep 29, 2023
18 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.9 milestone Sep 29, 2023
@Ankitasw Ankitasw deleted the remove-nolint-gosec branch September 29, 2023 14:27
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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants