restic/kubernetes/pod_list.go

Summary

Maintainability
A
1 hr
Test Coverage

Method PodLister.ListPods has 51 lines of code (exceeds 50 allowed). Consider refactoring.
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
Severity: Minor
Found in restic/kubernetes/pod_list.go - About 1 hr to fix

    Function NewPodLister has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func NewPodLister(ctx context.Context, k8cli client.Client, backupCommandAnnotation, fileExtensionAnnotation, backupContainerAnnotation, namespace string, targetPods []string, skipPreBackup bool, log logr.Logger) *PodLister {
    Severity: Minor
    Found in restic/kubernetes/pod_list.go - About 45 mins to fix

      There are no issues that match your filters.

      Category
      Status