chore: remove deprecated ioutil dependency#30
chore: remove deprecated ioutil dependency#30michael-valdron merged 1 commit intodevfile:mainfrom trader7:alizer-ioutil-dependency
Conversation
Signed-off-by: trader77 <[email protected]>
michael-valdron
left a comment
There was a problem hiding this comment.
Source changes for replacing "io/ioutil" looks good.
PR is just missing the linter check changes:
Enforce the package is not used in the future using linter (run the linter into CI)
Did you want to cover this part as well?
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
==========================================
- Coverage 70.48% 70.42% -0.06%
==========================================
Files 11 11
Lines 1555 1562 +7
==========================================
+ Hits 1096 1100 +4
- Misses 393 395 +2
- Partials 66 67 +1
☔ View full report in Codecov by Sentry. |
I'm not familiar with how to make the linter changes |
michael-valdron
left a comment
There was a problem hiding this comment.
PR is just missing the linter check changes:
Enforce the package is not used in the future using linter (run the linter into CI)
Did you want to cover this part as well?I'm not familiar with how to make the linter changes
No worries I will assign myself work on the linter changes.
I'll approve your PR as a partial fix.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: michael-valdron, trader7 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Not needed with these changes. |
Awesome, thanks! Sorry I missed the second part of the task there. I'll take a look at how you make the linter changes so that I'll know for next time. |
What does this PR do?
Removes deprecated ioutil dependency in 4 files listed below.
% find . -name "*.go" -type f -print | xargs grep /ioutil
./test/check_registry/check_registry.go: "io/ioutil"
./pkg/apis/enricher/framework/dotnet/dotnet_detector.go: "io/ioutil"
./pkg/apis/recognizer/devfile_recognizer.go: "io/ioutil"
./pkg/utils/detector.go: "io/ioutil"
Which issue(s) does this PR fix
Partial fix for devfile/api#1257
PR acceptance criteria
Testing and documentation do not need to be complete in order for this PR to be approved. We just need to ensure tracking issues are opened.
Unit/Functional tests
Documentation
How to test changes / Special notes to the reviewer
os.ReadDir replacement for ioutil.ReadDir requires looping through []fs.DirEntry to access []fs.FileInfo. Consider revising error handling on this loop, I copied the previous error handling from the call to ioutil.ReadDir