dotcloud/docker

View on GitHub
daemon/names.go

Summary

Maintainability
A
1 hr
Test Coverage

Method Daemon.reserveName has 5 return statements (exceeds 4 allowed).
Open

func (daemon *Daemon) reserveName(id, name string) (string, error) {
    if !validContainerNamePattern.MatchString(strings.TrimPrefix(name, "/")) {
        return "", errdefs.InvalidParameter(errors.Errorf("Invalid container name (%s), only %s are allowed", name, validContainerNameChars))
    }
    if name[0] != '/' {
Severity: Major
Found in daemon/names.go - About 35 mins to fix

    Method Daemon.registerName has 5 return statements (exceeds 4 allowed).
    Open

    func (daemon *Daemon) registerName(container *container.Container) error {
        if container.ID == "" {
            return fmt.Errorf("invalid empty id")
        }
        if daemon.containers.Get(container.ID) != nil {
    Severity: Major
    Found in daemon/names.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status