dotcloud/docker

View on GitHub

Showing 1,468 of 1,914 total issues

Method ImageService.createImageOCI has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

func (i *ImageService) createImageOCI(ctx context.Context, imgToCreate imagespec.DockerOCIImage,
    parentDigest digest.Digest, layers []ocispec.Descriptor,
    containerConfig container.Config,
Severity: Minor
Found in daemon/containerd/image_builder.go - About 35 mins to fix

    Method ImageService.imageDeleteHelper has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func (i *ImageService) imageDeleteHelper(ctx context.Context, img images.Image, all []images.Image, records *[]imagetypes.DeleteResponse, extra conflictType) error {
    Severity: Minor
    Found in daemon/containerd/image_delete.go - About 35 mins to fix

      Method ImageService.createDiff has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func (i *ImageService) createDiff(ctx context.Context, name string, sn snapshots.Snapshotter, cs content.Store, comparer diff.Comparer) (*ocispec.Descriptor, digest.Digest, error) {
      Severity: Minor
      Found in daemon/containerd/image_commit.go - About 35 mins to fix

        Function leaseContent has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func leaseContent(ctx context.Context, store content.Store, leasesManager leases.Manager, lease leases.Lease, desc ocispec.Descriptor) error {
        Severity: Minor
        Found in daemon/containerd/image_exporter.go - About 35 mins to fix

          Method ImageService.LoadImage has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          func (i *ImageService) LoadImage(ctx context.Context, inTar io.ReadCloser, platform *ocispec.Platform, outStream io.Writer, quiet bool) error {
          Severity: Minor
          Found in daemon/images/image_exporter.go - About 35 mins to fix

            Method Daemon.logClusterEvent has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            func (daemon *Daemon) logClusterEvent(action swarmapi.WatchActionKind, id string, eventType events.Type, eventTime time.Time, attributes map[string]string) {
            Severity: Minor
            Found in daemon/events.go - About 35 mins to fix

              Method ImageService.pullForBuilder has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              func (i *ImageService) pullForBuilder(ctx context.Context, name string, authConfigs map[string]registry.AuthConfig, output io.Writer, platform *ocispec.Platform) (*image.Image, error) {
              Severity: Minor
              Found in daemon/images/image_builder.go - About 35 mins to fix

                Method Daemon.ContainerAttachRaw has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                func (daemon *Daemon) ContainerAttachRaw(prefixOrName string, stdin io.ReadCloser, stdout, stderr io.Writer, doStream bool, attached chan struct{}) error {
                Severity: Minor
                Found in daemon/attach.go - About 35 mins to fix

                  Function buildCreateEndpointOptions has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  func buildCreateEndpointOptions(c *container.Container, n *libnetwork.Network, epConfig *network.EndpointSettings, sb *libnetwork.Sandbox, daemonDNS []string) ([]libnetwork.EndpointOption, error) {
                  Severity: Minor
                  Found in daemon/network.go - About 35 mins to fix

                    Method ImageService.PrepareSnapshot has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    func (i *ImageService) PrepareSnapshot(ctx context.Context, id string, parentImage string, platform *ocispec.Platform, setupInit func(string) error) error {
                    Severity: Minor
                    Found in daemon/images/image.go - About 35 mins to fix

                      Function DisplayJSONMessagesStream has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, isTerminal bool, auxCallback func(JSONMessage)) error {
                      Severity: Minor
                      Found in pkg/jsonmessage/jsonmessage.go - About 35 mins to fix

                        Function deleteAllNetworks has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        func deleteAllNetworks(ctx context.Context, t testing.TB, c client.NetworkAPIClient, daemonPlatform string, protectedNetworks map[string]struct{}) {
                        Severity: Minor
                        Found in testutil/environment/clean.go - About 35 mins to fix

                          Method layerStore.RegisterByGraphID has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          func (ls *layerStore) RegisterByGraphID(graphID string, parent ChainID, diffID DiffID, tarDataFile string, size int64) (Layer, error) {
                          Severity: Minor
                          Found in layer/migration.go - About 35 mins to fix

                            Function DevicesFromPath has 5 return statements (exceeds 4 allowed).
                            Open

                            func DevicesFromPath(pathOnHost, pathInContainer, cgroupPermissions string) (devs []specs.LinuxDevice, devPermissions []specs.LinuxDeviceCgroup, err error) {
                                resolvedPathOnHost := pathOnHost
                            
                                // check if it is a symbolic link
                                if src, e := os.Lstat(pathOnHost); e == nil && src.Mode()&os.ModeSymlink == os.ModeSymlink {
                            Severity: Major
                            Found in oci/devices_linux.go - About 35 mins to fix

                              Function atomicRemoveAll has 5 return statements (exceeds 4 allowed).
                              Open

                              func atomicRemoveAll(dir string) error {
                                  renamed := dir + "-removing"
                              
                                  err := os.Rename(dir, renamed)
                                  switch {
                              Severity: Major
                              Found in plugin/backend_linux.go - About 35 mins to fix

                                Function ParseLink has 5 return statements (exceeds 4 allowed).
                                Open

                                func ParseLink(val string) (string, string, error) {
                                    if val == "" {
                                        return "", "", fmt.Errorf("empty string specified for links")
                                    }
                                    arr := strings.Split(val, ":")
                                Severity: Major
                                Found in opts/opts.go - About 35 mins to fix

                                  Method RuntimeOpt.Set has 5 return statements (exceeds 4 allowed).
                                  Open

                                  func (o *RuntimeOpt) Set(val string) error {
                                      k, v, ok := strings.Cut(val, "=")
                                      if !ok {
                                          return fmt.Errorf("invalid runtime argument: %s", val)
                                      }
                                  Severity: Major
                                  Found in opts/runtime.go - About 35 mins to fix

                                    Function toRootless has 5 return statements (exceeds 4 allowed).
                                    Open

                                    func toRootless(spec *specs.Spec, v2Controllers []string, currentOOMScoreAdj int) error {
                                        if len(v2Controllers) == 0 {
                                            if spec.Linux != nil {
                                                // Remove cgroup settings.
                                                spec.Linux.Resources = nil
                                    Severity: Major
                                    Found in internal/rootless/specconv/specconv_linux.go - About 35 mins to fix

                                      Method Manager.fetch has 5 return statements (exceeds 4 allowed).
                                      Open

                                      func (pm *Manager) fetch(ctx context.Context, ref reference.Named, auth *registry.AuthConfig, out progress.Output, metaHeader http.Header, handlers ...images.Handler) (err error) {
                                          // We need to make sure we have a domain on the reference
                                          withDomain, err := reference.ParseNormalizedNamed(ref.String())
                                          if err != nil {
                                              return errors.Wrap(err, "error parsing plugin image reference")
                                      Severity: Major
                                      Found in plugin/fetch_linux.go - About 35 mins to fix

                                        Function MakeConfigFromV1Config has 5 return statements (exceeds 4 allowed).
                                        Open

                                        func MakeConfigFromV1Config(imageJSON []byte, rootfs *image.RootFS, history []image.History) ([]byte, error) {
                                            var dver struct {
                                                DockerVersion string `json:"docker_version"`
                                            }
                                        
                                        
                                        Severity: Major
                                        Found in image/v1/imagev1.go - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language