dotcloud/docker

View on GitHub
daemon/stop.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method Daemon.containerStop has 59 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (daemon *Daemon) containerStop(ctx context.Context, ctr *container.Container, options containertypes.StopOptions) (retErr error) {
    // Cancelling the request should not cancel the stop.
    ctx = context.WithoutCancel(ctx)

    if !ctr.IsRunning() {
Severity: Minor
Found in daemon/stop.go - About 1 hr to fix

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

    func (daemon *Daemon) containerStop(ctx context.Context, ctr *container.Container, options containertypes.StopOptions) (retErr error) {
        // Cancelling the request should not cancel the stop.
        ctx = context.WithoutCancel(ctx)
    
        if !ctr.IsRunning() {
    Severity: Major
    Found in daemon/stop.go - About 40 mins to fix

      There are no issues that match your filters.

      Category
      Status