asteris-llc/converge

View on GitHub
resource/docker/container/container.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method Container.diffContainer has 75 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (c *Container) diffContainer(container *dc.Container, status *resource.Status) error {
    expectedStatus := strings.ToLower(c.CStatus)
    if expectedStatus == "" {
        expectedStatus = containerStatusRunning
    }
Severity: Minor
Found in resource/docker/container/container.go - About 2 hrs to fix

    Method Container.compareLinks has 5 return statements (exceeds 4 allowed).
    Open

    func (c *Container) compareLinks(container *dc.Container) (actual, expected string) {
        normalizeLink := func(link string) string {
            // internally links are stored as "/linkedcontainername:/containername/alias"
            parts := strings.Split(link, ":")
            if len(parts) == 1 {
    Severity: Major
    Found in resource/docker/container/container.go - About 35 mins to fix

      Your code does not pass gofmt in 1 place. Go fmt your code!
      Open

      // Copyright © 2016 Asteris, LLC

      There are no issues that match your filters.

      Category
      Status