Preparing report...

Report for github.com/acouvreur/traefik-ondemand-service

A+    Excellent!    Found 5 issues across 8 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo100%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

No problems detected. Good job!


golint37%

Golint is a linter for Go source code.

    • traefik-ondemand-service/pkg/scaler/mocks/client_mock.go
    • Line 13: warning: exported type ContainerAPIClientMock should have comment or be unexported (golint)
    • Line 18: warning: exported function NewContainerAPIClientMock should have comment or be unexported (golint)
    • Line 22: warning: exported method ContainerAPIClientMock.ContainerStart should have comment or be unexported (golint)
    • Line 27: warning: exported method ContainerAPIClientMock.ContainerStop should have comment or be unexported (golint)
    • Line 32: warning: exported method ContainerAPIClientMock.ContainerInspect should have comment or be unexported (golint)
    • Line 37: warning: exported method ContainerAPIClientMock.ContainerList should have comment or be unexported (golint)
    • Line 42: warning: exported type ServiceAPIClientMock should have comment or be unexported (golint)
    • Line 47: warning: exported function NewServiceAPIClientMock should have comment or be unexported (golint)
    • Line 51: warning: exported method ServiceAPIClientMock.ServiceUpdate should have comment or be unexported (golint)
    • Line 56: warning: exported method ServiceAPIClientMock.ServiceList should have comment or be unexported (golint)
    • traefik-ondemand-service/pkg/scaler/docker_classic.go
    • Line 13: warning: exported type DockerClassicScaler should have comment or be unexported (golint)
    • Line 17: warning: exported function NewDockerClassicScaler should have comment or be unexported (golint)
    • Line 23: warning: exported method DockerClassicScaler.ScaleUp should have comment or be unexported (golint)
    • Line 42: warning: exported method DockerClassicScaler.ScaleDown should have comment or be unexported (golint)
    • Line 61: warning: exported method DockerClassicScaler.IsUp should have comment or be unexported (golint)
    • Line 84: warning: context.Context should be the first parameter of a function (golint)
    • Line 84: warning: exported method DockerClassicScaler.GetContainerByName should have comment or be unexported (golint)
    • traefik-ondemand-service/pkg/scaler/docker_swarm.go
    • Line 14: warning: exported type DockerSwarmScaler should have comment or be unexported (golint)
    • Line 18: warning: exported function NewDockerSwarmScaler should have comment or be unexported (golint)
    • Line 22: warning: exported method DockerSwarmScaler.ScaleUp should have comment or be unexported (golint)
    • Line 49: warning: exported method DockerSwarmScaler.ScaleDown should have comment or be unexported (golint)
    • Line 78: warning: exported method DockerSwarmScaler.IsUp should have comment or be unexported (golint)
    • Line 90: warning: context.Context should be the first parameter of a function (golint)
    • Line 90: warning: exported method DockerSwarmScaler.GetServiceByName should have comment or be unexported (golint)
    • traefik-ondemand-service/main.go
    • Line 18: warning: exported type OnDemandRequestState should have comment or be unexported (golint)
    • Line 131: warning: exported function ServeHTTPInternalError should have comment or be unexported (golint)
    • Line 136: warning: exported function ServeHTTPRequestState should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!