Showing 1,468 of 1,914 total issues
Method ImageService.createImageOCI
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (i *ImageService) createImageOCI(ctx context.Context, imgToCreate imagespec.DockerOCIImage,
parentDigest digest.Digest, layers []ocispec.Descriptor,
containerConfig container.Config,
Method ImageService.imageDeleteHelper
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (i *ImageService) imageDeleteHelper(ctx context.Context, img images.Image, all []images.Image, records *[]imagetypes.DeleteResponse, extra conflictType) error {
Method ImageService.createDiff
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (i *ImageService) createDiff(ctx context.Context, name string, sn snapshots.Snapshotter, cs content.Store, comparer diff.Comparer) (*ocispec.Descriptor, digest.Digest, error) {
Function leaseContent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func leaseContent(ctx context.Context, store content.Store, leasesManager leases.Manager, lease leases.Lease, desc ocispec.Descriptor) error {
Method ImageService.LoadImage
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (i *ImageService) LoadImage(ctx context.Context, inTar io.ReadCloser, platform *ocispec.Platform, outStream io.Writer, quiet bool) error {
Method Daemon.logClusterEvent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (daemon *Daemon) logClusterEvent(action swarmapi.WatchActionKind, id string, eventType events.Type, eventTime time.Time, attributes map[string]string) {
Method ImageService.pullForBuilder
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (i *ImageService) pullForBuilder(ctx context.Context, name string, authConfigs map[string]registry.AuthConfig, output io.Writer, platform *ocispec.Platform) (*image.Image, error) {
Method Daemon.ContainerAttachRaw
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (daemon *Daemon) ContainerAttachRaw(prefixOrName string, stdin io.ReadCloser, stdout, stderr io.Writer, doStream bool, attached chan struct{}) error {
Function buildCreateEndpointOptions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func buildCreateEndpointOptions(c *container.Container, n *libnetwork.Network, epConfig *network.EndpointSettings, sb *libnetwork.Sandbox, daemonDNS []string) ([]libnetwork.EndpointOption, error) {
Method ImageService.PrepareSnapshot
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (i *ImageService) PrepareSnapshot(ctx context.Context, id string, parentImage string, platform *ocispec.Platform, setupInit func(string) error) error {
Function DisplayJSONMessagesStream
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, isTerminal bool, auxCallback func(JSONMessage)) error {
Function deleteAllNetworks
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func deleteAllNetworks(ctx context.Context, t testing.TB, c client.NetworkAPIClient, daemonPlatform string, protectedNetworks map[string]struct{}) {
Method layerStore.RegisterByGraphID
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (ls *layerStore) RegisterByGraphID(graphID string, parent ChainID, diffID DiffID, tarDataFile string, size int64) (Layer, error) {
Function DevicesFromPath
has 5 return statements (exceeds 4 allowed). Open
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 {
Function atomicRemoveAll
has 5 return statements (exceeds 4 allowed). Open
Open
func atomicRemoveAll(dir string) error {
renamed := dir + "-removing"
err := os.Rename(dir, renamed)
switch {
Function ParseLink
has 5 return statements (exceeds 4 allowed). Open
Open
func ParseLink(val string) (string, string, error) {
if val == "" {
return "", "", fmt.Errorf("empty string specified for links")
}
arr := strings.Split(val, ":")
Method RuntimeOpt.Set
has 5 return statements (exceeds 4 allowed). Open
Open
func (o *RuntimeOpt) Set(val string) error {
k, v, ok := strings.Cut(val, "=")
if !ok {
return fmt.Errorf("invalid runtime argument: %s", val)
}
Function toRootless
has 5 return statements (exceeds 4 allowed). Open
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
Method Manager.fetch
has 5 return statements (exceeds 4 allowed). Open
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")
Function MakeConfigFromV1Config
has 5 return statements (exceeds 4 allowed). Open
Open
func MakeConfigFromV1Config(imageJSON []byte, rootfs *image.RootFS, history []image.History) ([]byte, error) {
var dver struct {
DockerVersion string `json:"docker_version"`
}