-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OPCT-199: Fixes related to CI code static analysis on dependencies (#60)
The motivation of this PR is to fix/bump the static code check used on Github CI, fixing issues reported on the new version. The issue has been started, and it's isolated, from the PR #54 Changes: 1) bump staticcheck version 2) fix issues reported by it StaticCheck plugin used to Code Analysis on our CI was reporting issues when bumping the OCP API lib, this is a false-positive: - https://github.com/redhat-openshift-ecosystem/provider-certification-tool/actions/runs/4608846263/jobs/8145167561 When updating the static check version it reports `io/ioutil` deprecation addressed on this PR: ~~~ Error: internal/pkg/sippy/sippy.go:6:2: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (SA1019) Error: pkg/assets/bindata.go:11:2: "io/ioutil" has been deprecated since Go 1.16: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details. (SA1019) Error: Process completed with exit code 1. ~~~ Follow up for: - #54 - https://issues.redhat.com/browse/OPCT-181 Tracking card: https://issues.redhat.com/browse/OPCT-199
- Loading branch information
Showing
5 changed files
with
52 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- pkg/assets/bindata.go 2023-04-11 12:33:12.134678061 -0300 | ||
+++ pkg/assets/bindata.go-ok 2023-04-11 12:33:07.950684962 -0300 | ||
@@ -8,7 +8,6 @@ | ||
|
||
import ( | ||
"fmt" | ||
- "io/ioutil" | ||
"os" | ||
"path/filepath" | ||
"strings" | ||
@@ -566,7 +565,7 @@ | ||
if err != nil { | ||
return err | ||
} | ||
- err = ioutil.WriteFile(_filePath(dir, name), data, info.Mode()) | ||
+ err = os.WriteFile(_filePath(dir, name), data, info.Mode()) | ||
if err != nil { | ||
return err | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.