dotcloud/docker

View on GitHub
libnetwork/drivers/bridge/internal/rlkclient/rootlesskit_client_linux.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function NewPortDriverClient has 7 return statements (exceeds 4 allowed).
Open

func NewPortDriverClient(ctx context.Context) (*PortDriverClient, error) {
    stateDir := os.Getenv("ROOTLESSKIT_STATE_DIR")
    if stateDir == "" {
        return nil, errors.New("$ROOTLESSKIT_STATE_DIR needs to be set")
    }
Severity: Major
Found in libnetwork/drivers/bridge/internal/rlkclient/rootlesskit_client_linux.go - About 45 mins to fix

    Method PortDriverClient.AddPort has 6 return statements (exceeds 4 allowed).
    Open

    func (c *PortDriverClient) AddPort(
        ctx context.Context,
        proto string,
        hostIP netip.Addr,
        childIP netip.Addr,
    Severity: Major
    Found in libnetwork/drivers/bridge/internal/rlkclient/rootlesskit_client_linux.go - About 40 mins to fix

      Method PortDriverClient.AddPort has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          ctx context.Context,
          proto string,
          hostIP netip.Addr,
          childIP netip.Addr,
          hostPort int,
      Severity: Minor
      Found in libnetwork/drivers/bridge/internal/rlkclient/rootlesskit_client_linux.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status