dotcloud/docker

View on GitHub

Showing 1,468 of 1,914 total issues

Method pluginRouter.upgradePlugin has 6 return statements (exceeds 4 allowed).
Open

func (pr *pluginRouter) upgradePlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
    if err := httputils.ParseForm(r); err != nil {
        return errors.Wrap(err, "failed to parse form")
    }

Severity: Major
Found in api/server/router/plugin/plugin_routes.go - About 40 mins to fix

    Method imageRouter.postImagesTag has 6 return statements (exceeds 4 allowed).
    Open

    func (ir *imageRouter) postImagesTag(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
        if err := httputils.ParseForm(r); err != nil {
            return err
        }
    
    
    Severity: Major
    Found in api/server/router/image/image_routes.go - About 40 mins to fix

      Method networkRouter.postNetworkCreate has 6 return statements (exceeds 4 allowed).
      Open

      func (n *networkRouter) postNetworkCreate(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
          if err := httputils.ParseForm(r); err != nil {
              return err
          }
      
      
      Severity: Major
      Found in api/server/router/network/network_routes.go - About 40 mins to fix

        Method session.searchRepositories has 6 return statements (exceeds 4 allowed).
        Open

        func (r *session) searchRepositories(term string, limit int) (*registry.SearchResults, error) {
            if limit == 0 {
                limit = defaultSearchLimit
            }
            if limit < 1 || limit > 100 {
        Severity: Major
        Found in registry/search_session.go - About 40 mins to fix

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

          func newV1Endpoint(index *registry.IndexInfo, headers http.Header) (*v1Endpoint, error) {
              tlsConfig, err := newTLSConfig(index.Name, index.Secure)
              if err != nil {
                  return nil, err
              }
          Severity: Major
          Found in registry/search_endpoint_v1.go - About 40 mins to fix

            Method Builder.Prune has 6 return statements (exceeds 4 allowed).
            Open

            func (b *Builder) Prune(ctx context.Context, opts types.BuildCachePruneOptions) (int64, []string, error) {
                ch := make(chan *controlapi.UsageRecord)
            
                eg, ctx := errgroup.WithContext(ctx)
            
            
            Severity: Major
            Found in builder/builder-next/builder.go - About 40 mins to fix

              Method containerManager.Run has 6 return statements (exceeds 4 allowed).
              Open

              func (c *containerManager) Run(ctx context.Context, cID string, stdout, stderr io.Writer) (err error) {
                  attached := make(chan struct{})
                  errCh := make(chan error, 1)
                  go func() {
                      errCh <- c.backend.ContainerAttachRaw(cID, nil, stdout, stderr, true, attached)
              Severity: Major
              Found in builder/dockerfile/containerbackend.go - About 40 mins to fix

                Method pluginRouter.pullPlugin has 6 return statements (exceeds 4 allowed).
                Open

                func (pr *pluginRouter) pullPlugin(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
                    if err := httputils.ParseForm(r); err != nil {
                        return errors.Wrap(err, "failed to parse form")
                    }
                
                
                Severity: Major
                Found in api/server/router/plugin/plugin_routes.go - About 40 mins to fix

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

                  func notifyClosed(ctx context.Context, conn net.Conn, notify func()) {
                      sc, ok := conn.(syscall.Conn)
                      if !ok {
                          log.G(ctx).Debug("notifyClosed: conn does not support close notifications")
                          return
                  Severity: Major
                  Found in api/server/router/container/notify_linux.go - About 40 mins to fix

                    Method Service.searchUnfiltered has 6 return statements (exceeds 4 allowed).
                    Open

                    func (s *Service) searchUnfiltered(ctx context.Context, term string, limit int, authConfig *registry.AuthConfig, headers http.Header) (*registry.SearchResults, error) {
                        // TODO Use ctx when searching for repositories
                        if hasScheme(term) {
                            return nil, invalidParamf("invalid repository name: repository name (%s) should not have a scheme", term)
                        }
                    Severity: Major
                    Found in registry/search.go - About 40 mins to fix

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

                      func dispatch(ctx context.Context, d dispatchRequest, cmd instructions.Command) (err error) {
                          if c, ok := cmd.(instructions.PlatformSpecific); ok {
                              err := c.CheckPlatform(d.state.operatingSystem)
                              if err != nil {
                                  return errdefs.InvalidParameter(err)
                      Severity: Major
                      Found in builder/dockerfile/evaluator.go - About 40 mins to fix

                        Method Worker.GetRemotes has 6 return statements (exceeds 4 allowed).
                        Open

                        func (w *Worker) GetRemotes(ctx context.Context, ref cache.ImmutableRef, createIfNeeded bool, _ cacheconfig.RefConfig, all bool, s session.Group) ([]*solver.Remote, error) {
                            if ref == nil {
                                return nil, nil
                            }
                            var diffIDs []layer.DiffID
                        Severity: Major
                        Found in builder/builder-next/worker/worker.go - About 40 mins to fix

                          Consider simplifying this complex logical expression.
                          Open

                              if d.state.operatingSystem == "windows" &&
                                  d.state.runConfig.ArgsEscaped != argsEscaped &&
                                  ((len(runConfig.Cmd) == 1 && strings.ToLower(runConfig.Cmd[0]) != `c:\windows\system32\cmd.exe` && len(runConfig.Shell) == 0) || (len(runConfig.Cmd) > 1)) {
                          Severity: Major
                          Found in builder/dockerfile/dispatchers.go - About 40 mins to fix

                            Method Builder.DiskUsage has 6 return statements (exceeds 4 allowed).
                            Open

                            func (b *Builder) DiskUsage(ctx context.Context) ([]*types.BuildCache, error) {
                                duResp, err := b.controller.DiskUsage(ctx, &controlapi.DiskUsageRequest{})
                                if err != nil {
                                    return nil, err
                                }
                            Severity: Major
                            Found in builder/builder-next/builder.go - About 40 mins to fix

                              Method systemRouter.getDiskUsage has 6 return statements (exceeds 4 allowed).
                              Open

                              func (s *systemRouter) getDiskUsage(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
                                  if err := httputils.ParseForm(r); err != nil {
                                      return err
                                  }
                              
                              
                              Severity: Major
                              Found in api/server/router/system/system_routes.go - About 40 mins to fix

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

                                func ReadJSON(r *http.Request, out interface{}) error {
                                    err := CheckForJSON(r)
                                    if err != nil {
                                        return err
                                    }
                                Severity: Major
                                Found in api/server/httputils/httputils.go - About 40 mins to fix

                                  Method containerRouter.postContainersAttach has 6 return statements (exceeds 4 allowed).
                                  Open

                                  func (c *containerRouter) postContainersAttach(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error {
                                      err := httputils.ParseForm(r)
                                      if err != nil {
                                          return err
                                      }
                                  Severity: Major
                                  Found in api/server/router/container/container_routes.go - About 40 mins to fix

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

                                    func handleSysctlBC(
                                        hostConfig *container.HostConfig,
                                        netConfig *network.NetworkingConfig,
                                        version string,
                                    ) (string, error) {
                                    Severity: Major
                                    Found in api/server/router/container/container_routes.go - About 40 mins to fix

                                      Method Daemon.SystemDiskUsage has 6 return statements (exceeds 4 allowed).
                                      Open

                                      func (daemon *Daemon) SystemDiskUsage(ctx context.Context, opts system.DiskUsageOptions) (*types.DiskUsage, error) {
                                          eg, ctx := errgroup.WithContext(ctx)
                                      
                                          var containers []*container.Summary
                                          if opts.Containers {
                                      Severity: Major
                                      Found in daemon/disk_usage.go - About 40 mins to fix

                                        Method task.Exec has 6 return statements (exceeds 4 allowed).
                                        Open

                                        func (t *task) Exec(ctx context.Context, processID string, spec *specs.Process, withStdin bool, attachStdio libcontainerdtypes.StdioCallback) (libcontainerdtypes.Process, error) {
                                            var (
                                                p              containerd.Process
                                                rio            cio.IO
                                                stdinCloseSync = make(chan containerd.Process, 1)
                                        Severity: Major
                                        Found in libcontainerd/remote/client.go - About 40 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language