kubernetes / git-sync

A sidecar app which clones a git repo and keeps it in sync with the upstream.
Apache License 2.0
2.16k stars 409 forks source link

Lint fixes (part 1) #783

Closed justinsb closed 11 months ago

justinsb commented 11 months ago

Fix a few misc linter issues:

main_test.go:750:7: Error return value is not checked (errcheck) touch(dirPath) ^ main_test.go:759:7: Error return value is not checked (errcheck) touch(filePath) ^ main_test.go:768:7: Error return value is not checked (errcheck) touch(newfilePath) ^ main.go:2089:3: S1023: redundant return statement (gosimple) return ^ main.go:1935:13: S1039: unnecessary use of fmt.Sprintf (gosimple) sshCmd += fmt.Sprintf(" -o StrictHostKeyChecking=no") ^ main.go:1152:33: SA1016: os.Kill cannot be trapped (did you mean syscall.SIGTERM?) (staticcheck) signal.Notify(c, os.Interrupt, os.Kill)

k8s-ci-robot commented 11 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb, thockin

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: - ~~[OWNERS](https://github.com/kubernetes/git-sync/blob/master/OWNERS)~~ [thockin] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment