dotcloud/docker

View on GitHub
libcontainerd/replace.go

Summary

Maintainability
A
1 hr
Test Coverage

Function ReplaceContainer has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

func ReplaceContainer(ctx context.Context, client types.Client, id string, spec *specs.Spec, shim string, runtimeOptions interface{}, opts ...containerd.NewContainerOpts) (types.Container, error) {
Severity: Major
Found in libcontainerd/replace.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

      There are no issues that match your filters.

      Category
      Status