Add more //nolint:staticcheck for failures caught in PR tests

This commit is contained in:
Hanna Lee
2021-07-18 14:48:32 -04:00
committed by Antonio Ojea
parent c862d7c0e9
commit c8fde197f5
3 changed files with 6 additions and 6 deletions

View File

@@ -305,7 +305,7 @@ func SupportsQuotas(m mount.Interface, path string) (bool, error) {
// If the pod UID is identical to another one known, it may (but presently
// doesn't) choose the same quota ID as other volumes in the pod.
//lint:ignore SA4009 poduid is overwritten by design, see comment below
func AssignQuota(m mount.Interface, path string, poduid types.UID, bytes *resource.Quantity) error {
func AssignQuota(m mount.Interface, path string, poduid types.UID, bytes *resource.Quantity) error { //nolint:staticcheck
if bytes == nil {
return fmt.Errorf("attempting to assign null quota to %s", path)
}
@@ -320,7 +320,7 @@ func AssignQuota(m mount.Interface, path string, poduid types.UID, bytes *resour
// volumes in a pod, we can simply remove this line of code.
// If and when we decide permanently that we're going to adopt
// one quota per volume, we can rip all of the pod code out.
poduid = types.UID(uuid.NewUUID())
poduid = types.UID(uuid.NewUUID()) //nolint:staticcheck
if pod, ok := dirPodMap[path]; ok && pod != poduid {
return fmt.Errorf("requesting quota on existing directory %s but different pod %s %s", path, pod, poduid)
}