-
Notifications
You must be signed in to change notification settings - Fork 236
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
Pr/4179 : Update golang-lintci and fixes the issues raise by it #4208
Conversation
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.55.2 to 1.59.0. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](golangci/golangci-lint@v1.55.2...v1.59.0) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
It will fix following errors ``` cmd/crc/cmd/cleanup.go:22:13: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive) RunE: func(cmd *cobra.Command, args []string) error { ^ cmd/crc/cmd/ip.go:17:13: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive) RunE: func(cmd *cobra.Command, args []string) error { ^ cmd/crc/cmd/oc_env.go:19:13: unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive) RunE: func(cmd *cobra.Command, args []string) error { ```
Looks like with latest version of linter to have annotating code, it need to be out of conditional statement. This PR fixes ``` pkg/crc/cluster/pullsecret.go:124:15: G110: Potential DoS vulnerability via decompression bomb (gosec) if _, err := io.Copy(&b, decompressor); err != nil { ^ make: *** [Makefile:284: cross-lint] Error 1 ```
If fixes following error ``` pkg/os/windows/powershell/powershell_windows.go:77:12: G306: Expect WriteFile permissions to be 0600 or less (gosec) if err := os.WriteFile(filename, append([]byte{0xef, 0xbb, 0xbf}, []byte(scriptContent)...), 0666); err != nil { ^ ```
@praveenkumar: The following tests failed, say
Full PR test history. Your PR dashboard. 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-sigs/prow repository. I understand the commands that are listed here. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cfergeau 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 |
supersede #4179