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

Fix errcheck linter for all non-test files #1813

Merged

Conversation

panslava
Copy link
Contributor

Add handling errors where it was missing

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 13, 2022
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 13, 2022
@panslava
Copy link
Contributor Author

/assign @kl52752
/assign @swetharepakula

cmd/echo/app/handlers.go Outdated Show resolved Hide resolved
cmd/echo/app/handlers.go Outdated Show resolved Hide resolved
cmd/fuzzer/fuzzer.go Outdated Show resolved Hide resolved
default:
flag.Usage()
os.Exit(1)
}

// Suppress klog logging before flag.Parse() error.
flag.CommandLine.Parse([]string{})
_ = flag.CommandLine.Parse([]string{})
Copy link
Contributor

Choose a reason for hiding this comment

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

this hack does not make sense. Maybe you should disable Lint in this place?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disabled lint for .Parse

cmd/glbc/app/handlers.go Outdated Show resolved Hide resolved
@@ -132,7 +132,7 @@ func NewController(ctx *ControllerContext) *Controller {
}

func (c *Controller) Run(stopCh <-chan struct{}) {
wait.PollUntil(5*time.Second, func() (bool, error) {
_ = wait.PollUntil(5*time.Second, func() (bool, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

as above maybe you should disable lint in this place

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disabled lint for .PollUntil

@panslava panslava force-pushed the fix-errcheck-for-prod-files branch 2 times, most recently from 0cd5282 to ba263af Compare September 14, 2022 11:02
Add handling errors where it was missing
@panslava panslava force-pushed the fix-errcheck-for-prod-files branch from ba263af to 50fc64f Compare September 14, 2022 11:05
@kl52752
Copy link
Contributor

kl52752 commented Sep 14, 2022

/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 14, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kl52752, panslava

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 merged commit b69ecdd into kubernetes:master Sep 14, 2022
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