dotcloud/docker

View on GitHub

Showing 1,468 of 1,914 total issues

Function Push has 6 return statements (exceeds 4 allowed).
Open

func Push(ctx context.Context, ref reference.Named, config *ImagePushConfig) error {
    // FIXME: Allow to interrupt current push when new push of same image is done.

    // Resolve the Repository name from fqn to RepositoryInfo
    repoInfo, err := config.RegistryService.ResolveRepository(ref)
Severity: Major
Found in distribution/push.go - About 40 mins to fix

    Function parseTCPAddr has 6 return statements (exceeds 4 allowed).
    Open

    func parseTCPAddr(address string, strict bool) (*url.URL, error) {
        if !strict && !strings.Contains(address, "://") {
            address = "tcp://" + address
        }
        parsedURL, err := url.Parse(address)
    Severity: Major
    Found in opts/hosts.go - About 40 mins to fix

      Function pullEndpoints has 6 return statements (exceeds 4 allowed).
      Open

      func pullEndpoints(ctx context.Context, registryService RegistryResolver, ref reference.Named,
          f func(context.Context, registry.RepositoryInfo, registry.APIEndpoint) error,
      ) (*registry.RepositoryInfo, error) {
          // Resolve the Repository name from fqn to RepositoryInfo
          repoInfo, err := registryService.ResolveRepository(ref)
      Severity: Major
      Found in distribution/pull.go - About 40 mins to fix

        Method pushDescriptor.uploadUsingSession has 6 return statements (exceeds 4 allowed).
        Open

        func (pd *pushDescriptor) uploadUsingSession(
            ctx context.Context,
            progressOutput progress.Output,
            diffID layer.DiffID,
            layerUpload distribution.BlobWriter,
        Severity: Major
        Found in distribution/push_v2.go - About 40 mins to fix

          Function verifySchema1Manifest has 6 return statements (exceeds 4 allowed).
          Open

          func verifySchema1Manifest(signedManifest *schema1.SignedManifest, ref reference.Reference) (m *schema1.Manifest, err error) {
              // If pull by digest, then verify the manifest digest. NOTE: It is
              // important to do this first, before any other content validation. If the
              // digest cannot be verified, don't even bother with those other things.
              if digested, isCanonical := ref.(reference.Canonical); isCanonical {
          Severity: Major
          Found in distribution/pull_v2.go - About 40 mins to fix

            Function fixManifestLayers has 6 return statements (exceeds 4 allowed).
            Open

            func fixManifestLayers(m *schema1.Manifest) error {
                imgs := make([]*image.V1Image, len(m.FSLayers))
                for i := range m.FSLayers {
                    img := &image.V1Image{}
            
            
            Severity: Major
            Found in distribution/pull_v2.go - About 40 mins to fix

              Method pusher.pushRepository has 6 return statements (exceeds 4 allowed).
              Open

              func (p *pusher) pushRepository(ctx context.Context) (err error) {
                  if namedTagged, isNamedTagged := p.ref.(reference.NamedTagged); isNamedTagged {
                      imageID, err := p.config.ReferenceStore.Get(p.ref)
                      if err != nil {
                          return fmt.Errorf("tag does not exist: %s", reference.FamiliarString(p.ref))
              Severity: Major
              Found in distribution/push_v2.go - About 40 mins to fix

                Method IPAMData.UnmarshalJSON has 6 return statements (exceeds 4 allowed).
                Open

                func (i *IPAMData) UnmarshalJSON(data []byte) error {
                    var (
                        m   map[string]interface{}
                        err error
                    )
                Severity: Major
                Found in libnetwork/driverapi/ipamdata.go - About 40 mins to fix

                  Method Endpoint.Delete has 6 return statements (exceeds 4 allowed).
                  Open

                  func (ep *Endpoint) Delete(ctx context.Context, force bool) error {
                      var err error
                      n, err := ep.getNetworkFromStore()
                      if err != nil {
                          return fmt.Errorf("failed to get network during Delete: %v", err)
                  Severity: Major
                  Found in libnetwork/endpoint.go - About 40 mins to fix

                    Method Controller.handleKeyChange has 6 return statements (exceeds 4 allowed).
                    Open

                    func (c *Controller) handleKeyChange(keys []*types.EncryptionKey) error {
                        drvEnc := discoverapi.DriverEncryptionUpdate{}
                    
                        agent := c.getAgent()
                        if agent == nil {
                    Severity: Major
                    Found in libnetwork/agent.go - About 40 mins 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

                        Method Endpoint.deleteServiceInfoFromCluster has 6 return statements (exceeds 4 allowed).
                        Open

                        func (ep *Endpoint) deleteServiceInfoFromCluster(sb *Sandbox, fullRemove bool, method string) error {
                            if len(ep.dnsNames) == 0 {
                                return nil
                            }
                        
                        
                        Severity: Major
                        Found in libnetwork/agent.go - About 40 mins to fix

                          Method EndpointInterface.UnmarshalJSON has 6 return statements (exceeds 4 allowed).
                          Open

                          func (epi *EndpointInterface) UnmarshalJSON(b []byte) error {
                              var (
                                  err   error
                                  epMap map[string]interface{}
                              )
                          Severity: Major
                          Found in libnetwork/endpoint_info.go - About 40 mins to fix

                            Function addEpToResolverImpl has 6 return statements (exceeds 4 allowed).
                            Open

                            func addEpToResolverImpl(
                                ctx context.Context,
                                netName, epName string,
                                epIface *EndpointInterface,
                                resolvers []*Resolver,
                            Severity: Major
                            Found in libnetwork/network_windows.go - About 40 mins to fix

                              Method Sandbox.clearNetworkResources has 6 return statements (exceeds 4 allowed).
                              Open

                              func (sb *Sandbox) clearNetworkResources(origEp *Endpoint) error {
                                  ep := sb.GetEndpoint(origEp.id)
                                  if ep == nil {
                                      return fmt.Errorf("could not find the sandbox endpoint data for endpoint %s",
                                          origEp.id)
                              Severity: Major
                              Found in libnetwork/sandbox.go - About 40 mins to fix

                                Function UserModified has 6 return statements (exceeds 4 allowed).
                                Open

                                func UserModified(rcPath, rcHashPath string) (bool, error) {
                                    currRCHash, err := os.ReadFile(rcHashPath)
                                    if err != nil {
                                        // If the hash file doesn't exist, can only assume it hasn't been written
                                        // yet (so, the user hasn't modified the file it hashes).
                                Severity: Major
                                Found in libnetwork/internal/resolvconf/resolvconf.go - About 40 mins to fix

                                  Method Sandbox.SetKey has 6 return statements (exceeds 4 allowed).
                                  Open

                                  func (sb *Sandbox) SetKey(ctx context.Context, basePath string) error {
                                      start := time.Now()
                                      defer func() {
                                          log.G(ctx).Debugf("sandbox set key processing took %s for container %s", time.Since(start), sb.ContainerID())
                                      }()
                                  Severity: Major
                                  Found in libnetwork/sandbox_linux.go - About 40 mins to fix

                                    Function getIPInterface has 6 return statements (exceeds 4 allowed).
                                    Open

                                    func getIPInterface(name string) (string, error) {
                                        ifaces, err := net.Interfaces()
                                        if err != nil {
                                            return "", err
                                        }
                                    Severity: Major
                                    Found in libnetwork/cmd/networkdb-test/dbserver/ndbServer.go - About 40 mins to fix

                                      Method driver.EndpointOperInfo has 6 return statements (exceeds 4 allowed).
                                      Open

                                      func (d *driver) EndpointOperInfo(nid, eid string) (map[string]interface{}, error) {
                                          // Get the network handler and make sure it exists
                                          d.Lock()
                                          n, ok := d.networks[nid]
                                          d.Unlock()
                                      Severity: Major
                                      Found in libnetwork/drivers/bridge/bridge_linux.go - About 40 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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language