dotcloud/docker

View on GitHub

Showing 1,904 of 1,904 total issues

Method client.NewContainer has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

func (c *client) NewContainer(_ context.Context, id string, spec *specs.Spec, shim string, runtimeOptions interface{}, opts ...containerd.NewContainerOpts) (libcontainerdtypes.Container, error) {
Severity: Minor
Found in libcontainerd/local/local_windows.go - About 45 mins to fix

    Method ImageService.pullForBuilder has 7 return statements (exceeds 4 allowed).
    Open

    func (i *ImageService) pullForBuilder(ctx context.Context, name string, authConfigs map[string]registry.AuthConfig, output io.Writer, platform *ocispec.Platform) (*ocispec.Descriptor, error) {
        ref, err := reference.ParseNormalizedNamed(name)
        if err != nil {
            return nil, err
        }
    Severity: Major
    Found in daemon/containerd/image_builder.go - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                      } else if !allTags {
                          if tagged, ok := repoRef.(reference.Tagged); ok {
                              if tag == "" {
                                  tag = tagged.Tag()
                              } else if tag != tagged.Tag() {
      Severity: Major
      Found in daemon/containerd/image_delete.go - About 45 mins to fix

        Method Cluster.resolveSystemAddrViaSubnetCheck has 7 return statements (exceeds 4 allowed).
        Open

        func (c *Cluster) resolveSystemAddrViaSubnetCheck() (net.IP, error) {
            // Use the system's only IP address, or fail if there are
            // multiple addresses to choose from. Skip interfaces which
            // are managed by docker via subnet check.
            interfaces, err := net.Interfaces()
        Severity: Major
        Found in daemon/cluster/listen_addr.go - About 45 mins to fix

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

          func initClusterSpec(node *swarmnode.Node, spec types.Spec) error {
              ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
              defer cancel()
              for conn := range node.ListenControlSocket(ctx) {
                  if ctx.Err() != nil {
          Severity: Major
          Found in daemon/cluster/swarm.go - About 45 mins to fix

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

            func newController(b executorpkg.Backend, i executorpkg.ImageBackend, v executorpkg.VolumeBackend, task *api.Task, node *api.NodeDescription, dependencies exec.DependencyGetter) (*controller, error) {
            Severity: Minor
            Found in daemon/cluster/executor/container/controller.go - About 45 mins to fix

              Method ImageManifest.IsPseudoImage has 7 return statements (exceeds 4 allowed).
              Open

              func (im *ImageManifest) IsPseudoImage(ctx context.Context) (bool, error) {
                  if im.IsAttestation() {
                      return true, nil
                  }
              
              
              Severity: Major
              Found in daemon/containerd/image_manifest.go - About 45 mins to fix

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

                func resolveInterfaceAddr(specifiedInterface string) (net.IP, error) {
                    // Use a specific interface's IP address.
                    intf, err := net.InterfaceByName(specifiedInterface)
                    if err != nil {
                        return nil, errNoSuchInterface
                Severity: Major
                Found in daemon/cluster/listen_addr.go - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  } else if ctnr.State.ExitCode != 0 {
                                      return &exitError{code: ctnr.State.ExitCode, cause: healthErr}
                                  }
                  Severity: Major
                  Found in daemon/cluster/executor/container/controller.go - About 45 mins to fix

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

                    func writeContentsForImage(ctx context.Context, snName string, cs content.Store,
                        newConfig imagespec.DockerOCIImage, layers []ocispec.Descriptor,
                        containerConfig container.Config,
                    Severity: Minor
                    Found in daemon/containerd/image_builder.go - About 45 mins to fix

                      Method ImageService.PullImage has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      func (i *ImageService) PullImage(ctx context.Context, baseRef reference.Named, platform *ocispec.Platform, metaHeaders map[string][]string, authConfig *registrytypes.AuthConfig, outStream io.Writer) (retErr error) {
                      Severity: Minor
                      Found in daemon/containerd/image_pull.go - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                            if isLastManager(reachable, unreachable) {
                                                msg += "Removing the last manager erases all current state of the swarm. Use `--force` to ignore this message. "
                                                return errors.WithStack(notAvailableError(msg))
                                            }
                        Severity: Major
                        Found in daemon/cluster/swarm.go - About 45 mins to fix

                          Method ImageService.pullTag has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          func (i *ImageService) pullTag(ctx context.Context, ref reference.Named, platform *ocispec.Platform, metaHeaders map[string][]string, authConfig *registrytypes.AuthConfig, out progress.Output) error {
                          Severity: Minor
                          Found in daemon/containerd/image_pull.go - About 45 mins to fix

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

                            func newContainerAdapter(b executorpkg.Backend, i executorpkg.ImageBackend, v executorpkg.VolumeBackend, task *api.Task, node *api.NodeDescription, dependencies exec.DependencyGetter) (*containerAdapter, error) {
                            Severity: Minor
                            Found in daemon/cluster/executor/container/adapter.go - About 45 mins to fix

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

                              func newNetworkAttacherController(b executorpkg.Backend, i executorpkg.ImageBackend, v executorpkg.VolumeBackend, task *api.Task, node *api.NodeDescription, dependencies exec.DependencyGetter) (*networkAttacherController, error) {
                              Severity: Minor
                              Found in daemon/cluster/executor/container/attachment.go - About 45 mins to fix

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

                                func validateHealthCheck(healthConfig *containertypes.HealthConfig) error {
                                    if healthConfig == nil {
                                        return nil
                                    }
                                    if healthConfig.Interval != 0 && healthConfig.Interval < containertypes.MinimumDuration {
                                Severity: Major
                                Found in daemon/container.go - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                      if firstPartial {
                                                          msg.Timestamp = time.Now().UTC()
                                                          partialTS = msg.Timestamp
                                                          partialid = stringid.GenerateRandomID()
                                                          ordinal = 1
                                  Severity: Major
                                  Found in daemon/logger/copier.go - About 45 mins to fix

                                    Method Daemon.Kill has 7 return statements (exceeds 4 allowed).
                                    Open

                                    func (daemon *Daemon) Kill(container *containerpkg.Container) error {
                                        if !container.IsRunning() {
                                            return errNotRunning(container.ID)
                                        }
                                    
                                    
                                    Severity: Major
                                    Found in daemon/kill.go - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if path[n] == '.' {
                                                              break
                                                          }
                                      Severity: Major
                                      Found in daemon/logger/loggerutils/file_windows.go - About 45 mins to fix

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

                                        func ValidateLogOpt(cfg map[string]string) error {
                                            address, err := parseAddress(cfg["gelf-address"])
                                            if err != nil {
                                                return err
                                            }
                                        Severity: Major
                                        Found in daemon/logger/gelf/gelf.go - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language