-
Notifications
You must be signed in to change notification settings - Fork 246
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
Fix deprecated use of tar.TypeRegA
(SA1019)
#1980
Fix deprecated use of tar.TypeRegA
(SA1019)
#1980
Conversation
8ff1d25
to
ef41778
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s not immediately obvious to me that we can just stop processing these values.
Is there a reason why this is safe? E.g. maybe because the inputs are being created by the same process and we can see the code that generated it? Or can these values never show up nowadays?
If this is processing externally-processed tarballs built by other implementations, or 7-year-old images, and those could actually generate those values, we should not be breaking that.
(I’m not saying that this is the wrong approach; from a very quick skim, it might be the right one — but I assume you have checked, so it would be nice to have a written record of the situation.)
For the record, in both affected places, the headers come from /lgtm |
I have the same thoughts. I checked the |
Signed-off-by: Jan Rodák <[email protected]>
ef41778
to
ee13fd9
Compare
In principle, generate a tar file like that, and see that it processed correctly. golang/go@e4bde05 did add a test for the read code; we don’t have a test that we are using that source of the data. On balance, I think adding tests for this situation is overkill. It wouldn’t hurt but there are whole subpackages in this project with no unit tests at all, that would be a better use of time. (Alternatively, we could just silence the warning, but when the raw |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Honny1, mtrmac 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 |
/lgtm |
This PR fixes warning deprecated use of
tar.TypeRegA
(SA1019) found bygolangci
when thestaticcheck
linter is enabled.Partially fixes: