dotcloud/docker

View on GitHub

Showing 1,468 of 1,914 total issues

Method Builder.performCopy has 8 return statements (exceeds 4 allowed).
Open

func (b *Builder) performCopy(ctx context.Context, req dispatchRequest, inst copyInstruction) error {
    state := req.state
    srcHash := getSourceHashFromInfos(inst.infos)

    var chownComment string
Severity: Major
Found in builder/dockerfile/internals.go - About 50 mins to fix

    Method Config.CopyStreams has 8 return statements (exceeds 4 allowed).
    Open

    func (c *Config) CopyStreams(ctx context.Context, cfg *AttachConfig) <-chan error {
        var group errgroup.Group
    
        // Connect stdin of container to the attach stdin stream.
        if cfg.Stdin != nil {
    Severity: Major
    Found in container/stream/attach.go - About 50 mins to fix

      Method Builder.dispatchDockerfileWithCancellation has 8 return statements (exceeds 4 allowed).
      Open

      func (b *Builder) dispatchDockerfileWithCancellation(ctx context.Context, parseResult []instructions.Stage, metaArgs []instructions.ArgCommand, escapeToken rune, source builder.Source) (*dispatchState, error) {
          dispatchRequest := dispatchRequest{}
          buildArgs := NewBuildArgs(b.options.BuildArgs)
          totalCommands := len(metaArgs) + len(parseResult)
          currentCommandIndex := 1
      Severity: Major
      Found in builder/dockerfile/builder.go - About 50 mins to fix

        Method Daemon.initNetworkController has 8 return statements (exceeds 4 allowed).
        Open

        func (daemon *Daemon) initNetworkController(daemonCfg *config.Config, activeSandboxes map[string]interface{}) error {
            netOptions, err := daemon.networkOptions(daemonCfg, nil, daemon.id, nil)
            if err != nil {
                return err
            }
        Severity: Major
        Found in daemon/daemon_windows.go - About 50 mins to fix

          Function ReplaceContainer has 8 return statements (exceeds 4 allowed).
          Open

          func ReplaceContainer(ctx context.Context, client types.Client, id string, spec *specs.Spec, shim string, runtimeOptions interface{}, opts ...containerd.NewContainerOpts) (types.Container, error) {
              newContainer := func() (types.Container, error) {
                  return client.NewContainer(ctx, id, spec, shim, runtimeOptions, opts...)
              }
              ctr, err := newContainer()
          Severity: Major
          Found in libcontainerd/replace.go - About 50 mins to fix

            Method ImageService.ImportImage has 8 return statements (exceeds 4 allowed).
            Open

            func (i *ImageService) ImportImage(ctx context.Context, ref reference.Named, platform *ocispec.Platform, msg string, layerReader io.Reader, changes []string) (image.ID, error) {
                refString := ""
                if ref != nil {
                    refString = ref.String()
                }
            Severity: Major
            Found in daemon/containerd/image_import.go - About 50 mins to fix

              Function handleMACAddressBC has 8 return statements (exceeds 4 allowed).
              Open

              func handleMACAddressBC(config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, version string) (string, error) {
                  deprecatedMacAddress := config.MacAddress //nolint:staticcheck // ignore SA1019: field is deprecated, but still used on API < v1.44.
              
                  // For older versions of the API, migrate the container-wide MAC address to EndpointsConfig.
                  if versions.LessThan(version, "1.44") {
              Severity: Major
              Found in api/server/router/container/container_routes.go - About 50 mins to fix

                Method Cluster.GetTasks has 8 return statements (exceeds 4 allowed).
                Open

                func (c *Cluster) GetTasks(options apitypes.TaskListOptions) ([]types.Task, error) {
                    var r *swarmapi.ListTasksResponse
                
                    err := c.lockedManagerAction(func(ctx context.Context, state nodeState) error {
                        filterTransform := func(filter filters.Args) error {
                Severity: Major
                Found in daemon/cluster/tasks.go - About 50 mins to fix

                  Method Cluster.resolveSystemAddr has 8 return statements (exceeds 4 allowed).
                  Open

                  func (c *Cluster) resolveSystemAddr() (net.IP, error) {
                      // Use the system's only device IP address, or fail if there are
                      // multiple addresses to choose from.
                      interfaces, err := nlwrap.LinkList()
                      if err != nil {
                  Severity: Major
                  Found in daemon/cluster/listen_addr_linux.go - About 50 mins to fix

                    Method controller.Logs has 8 return statements (exceeds 4 allowed).
                    Open

                    func (r *controller) Logs(ctx context.Context, publisher exec.LogPublisher, options api.LogSubscriptionOptions) error {
                        if err := r.checkClosed(); err != nil {
                            return err
                        }
                    
                    
                    Severity: Major
                    Found in daemon/cluster/executor/container/controller.go - About 50 mins to fix

                      Method ImageService.CreateImage has 8 return statements (exceeds 4 allowed).
                      Open

                      func (i *ImageService) CreateImage(ctx context.Context, config []byte, parent string, layerDigest digest.Digest) (builder.Image, error) {
                          imgToCreate, err := dimage.NewFromJSON(config)
                          if err != nil {
                              return nil, err
                          }
                      Severity: Major
                      Found in daemon/containerd/image_builder.go - About 50 mins to fix

                        Method rwlayer.Commit has 8 return statements (exceeds 4 allowed).
                        Open

                        func (rw *rwlayer) Commit() (_ builder.ROLayer, outErr error) {
                            snapshotter := rw.c.SnapshotService(rw.snapshotter)
                        
                            key := stringid.GenerateRandomID()
                        
                        
                        Severity: Major
                        Found in daemon/containerd/image_builder.go - About 50 mins to fix

                          Method ImageService.CommitImage has 8 return statements (exceeds 4 allowed).
                          Open

                          func (i *ImageService) CommitImage(ctx context.Context, cc backend.CommitConfig) (image.ID, error) {
                              container := i.containers.Get(cc.ContainerID)
                              cs := i.content
                          
                              var parentManifest ocispec.Manifest
                          Severity: Major
                          Found in daemon/containerd/image_commit.go - About 50 mins to fix

                            Method ImageService.TagImage has 8 return statements (exceeds 4 allowed).
                            Open

                            func (i *ImageService) TagImage(ctx context.Context, imageID image.ID, newTag reference.Named) error {
                                targetImage, err := i.resolveImage(ctx, imageID.String())
                                if err != nil {
                                    return errors.Wrapf(err, "failed to resolve image id %q to a descriptor", imageID.String())
                                }
                            Severity: Major
                            Found in daemon/containerd/image_tag.go - About 50 mins to fix

                              Method Cluster.Leave has 8 return statements (exceeds 4 allowed).
                              Open

                              func (c *Cluster) Leave(ctx context.Context, force bool) error {
                                  c.controlMutex.Lock()
                                  defer c.controlMutex.Unlock()
                              
                                  c.mu.Lock()
                              Severity: Major
                              Found in daemon/cluster/swarm.go - About 50 mins to fix

                                Method reader.initialSeekTail has 8 return statements (exceeds 4 allowed).
                                Open

                                func (r *reader) initialSeekTail() (bool, error) {
                                    var err error
                                    if r.config.Until.IsZero() {
                                        err = r.j.SeekTail()
                                    } else {
                                Severity: Major
                                Found in daemon/logger/journald/read.go - About 50 mins to fix

                                  Function ValidateLogOpts has 8 return statements (exceeds 4 allowed).
                                  Open

                                  func ValidateLogOpts(name string, cfg map[string]string) error {
                                      if name == "none" {
                                          return nil
                                      }
                                  
                                  
                                  Severity: Major
                                  Found in daemon/logger/factory.go - About 50 mins to fix

                                    Method reader.readLogs has 8 return statements (exceeds 4 allowed).
                                    Open

                                    func (r *reader) readLogs(ctx context.Context) {
                                        defer close(r.logWatcher.Msg)
                                    
                                        // Make sure the ready channel is closed in the event of an early
                                        // return.
                                    Severity: Major
                                    Found in daemon/logger/journald/read.go - About 50 mins to fix

                                      Method Cluster.Join has 8 return statements (exceeds 4 allowed).
                                      Open

                                      func (c *Cluster) Join(req types.JoinRequest) error {
                                          c.controlMutex.Lock()
                                          defer c.controlMutex.Unlock()
                                          c.mu.Lock()
                                          if c.nr != nil {
                                      Severity: Major
                                      Found in daemon/cluster/swarm.go - About 50 mins to fix

                                        Method pluginAdapterWithRead.ReadLogs has 8 return statements (exceeds 4 allowed).
                                        Open

                                        func (a *pluginAdapterWithRead) ReadLogs(ctx context.Context, config ReadConfig) *LogWatcher {
                                            watcher := NewLogWatcher()
                                        
                                            go func() {
                                                defer close(watcher.Msg)
                                        Severity: Major
                                        Found in daemon/logger/adapter.go - About 50 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language