dotcloud/docker

View on GitHub
libnetwork/osl/neigh_linux.go

Summary

Maintainability
A
1 hr
Test Coverage

Method Namespace.AddNeighbor has 56 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (n *Namespace) AddNeighbor(dstIP net.IP, dstMac net.HardwareAddr, force bool, options ...NeighOption) error {
    var (
        iface                  netlink.Link
        err                    error
        neighborAlreadyPresent bool
Severity: Minor
Found in libnetwork/osl/neigh_linux.go - About 1 hr to fix

    Method Namespace.AddNeighbor has 6 return statements (exceeds 4 allowed).
    Open

    func (n *Namespace) AddNeighbor(dstIP net.IP, dstMac net.HardwareAddr, force bool, options ...NeighOption) error {
        var (
            iface                  netlink.Link
            err                    error
            neighborAlreadyPresent bool
    Severity: Major
    Found in libnetwork/osl/neigh_linux.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status