dotcloud/docker

View on GitHub
restartmanager/restartmanager.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method RestartManager.ShouldRestart has 63 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (rm *RestartManager) ShouldRestart(exitCode uint32, hasBeenManuallyStopped bool, executionDuration time.Duration) (bool, chan error, error) {
    if rm.policy.IsNone() {
        return false, nil, nil
    }
    rm.Lock()
Severity: Minor
Found in restartmanager/restartmanager.go - About 1 hr to fix

    Method RestartManager.ShouldRestart has 5 return statements (exceeds 4 allowed).
    Open

    func (rm *RestartManager) ShouldRestart(exitCode uint32, hasBeenManuallyStopped bool, executionDuration time.Duration) (bool, chan error, error) {
        if rm.policy.IsNone() {
            return false, nil, nil
        }
        rm.Lock()
    Severity: Major
    Found in restartmanager/restartmanager.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status