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

Pr/4179 : Update golang-lintci and fixes the issues raise by it #4208

Merged
merged 4 commits into from
Jun 6, 2024

Conversation

praveenkumar
Copy link
Member

supersede #4179

dependabot bot and others added 4 commits May 27, 2024 17:19
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 {
	          ^
```
@openshift-ci openshift-ci bot requested review from adrianriobo and gbraad June 5, 2024 14:47
Copy link

openshift-ci bot commented Jun 5, 2024

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

Test name Commit Details Required Rerun command
ci/prow/e2e-microshift-crc b88dd0a link true /test e2e-microshift-crc
ci/prow/e2e-crc b88dd0a link true /test e2e-crc
ci/prow/security b88dd0a link false /test security
ci/prow/integration-crc b88dd0a link true /test integration-crc
ci/prow/images b88dd0a link true /test images

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.

Copy link

openshift-ci bot commented Jun 5, 2024

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jun 5, 2024
@anjannath anjannath merged commit cd2dfcc into crc-org:main Jun 6, 2024
16 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants