migrate nolint coments to golangci-lint

This commit is contained in:
Antonio Ojea
2021-11-16 16:57:58 +01:00
parent 272b31da50
commit d126b14838
22 changed files with 41 additions and 34 deletions

View File

@@ -18,6 +18,7 @@ package storage
import (
"context"
"k8s.io/apimachinery/pkg/apis/meta/internalversion"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
@@ -96,7 +97,7 @@ func (r *REST) Categories() []string {
}
func (r *REST) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error) {
//lint:ignore SA1019 backwards compatibility
//nolint:staticcheck // SA1019 backwards compatibility
//nolint: staticcheck
if options != nil && options.PropagationPolicy == nil && options.OrphanDependents == nil &&
job.Strategy.DefaultGarbageCollectionPolicy(ctx) == rest.OrphanDependents {
@@ -108,8 +109,7 @@ func (r *REST) Delete(ctx context.Context, name string, deleteValidation rest.Va
}
func (r *REST) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, deleteOptions *metav1.DeleteOptions, listOptions *internalversion.ListOptions) (runtime.Object, error) {
//lint:ignore SA1019 backwards compatibility
//nolint: staticcheck
//nolint:staticcheck // SA1019 backwards compatibility
if deleteOptions.PropagationPolicy == nil && deleteOptions.OrphanDependents == nil &&
job.Strategy.DefaultGarbageCollectionPolicy(ctx) == rest.OrphanDependents {
// Throw a warning if delete options are not explicitly set as Job deletion strategy by default is orphaning