restic/kubernetes/pod_list.go
Method PodLister.ListPods
has 51 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (p *PodLister) ListPods() ([]BackupPod, error) {
p.log.Info("listing all pods", "annotation", p.backupCommandAnnotation, "namespace", p.namespace)
if p.err != nil {
return nil, p.err
Function NewPodLister
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func NewPodLister(ctx context.Context, k8cli client.Client, backupCommandAnnotation, fileExtensionAnnotation, backupContainerAnnotation, namespace string, targetPods []string, skipPreBackup bool, log logr.Logger) *PodLister {