Preparing report...

Report for github.com/krane/krane

A+    Excellent!    Found 38 issues across 68 files

Tweet

gofmt98%

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


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!


golint48%

Golint is a linter for Go source code.

    • krane/internal/deployment/container.go
    • Line 46: warning: exported type ContainerStatus should have comment or be unexported (golint)
    • Line 49: warning: exported const ContainerRunning should have comment (or a comment on this block) or be unexported (golint)
    • Line 83: warning: comment on exported method KraneContainer.Stop should be of the form "Stop ..." (golint)
    • krane/internal/deployment/jobs.go
    • Line 12: warning: exported type JobType should have comment or be unexported (golint)
    • Line 15: warning: exported const RunDeploymentJobType should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported function CreateJobsCollection should be of the form "CreateJobsCollection ..." (golint)
    • Line 40: warning: comment on exported function DeleteJobsCollection should be of the form "DeleteJobsCollection ..." (golint)
    • Line 83: warning: comment on exported function GetJobsByDeployment should be of the form "GetJobsByDeployment ..." (golint)
    • krane/internal/deployment/phases.go
    • Line 3: warning: comment on exported type Phase should be of the form "Phase ..." (with optional leading article) (golint)
    • Line 8: warning: exported const SetupPhase should have comment (or a comment on this block) or be unexported (golint)
    • krane/internal/proxy/traefik.go
    • Line 11: warning: exported type TraefikLabel should have comment or be unexported (golint)
    • Line 16: warning: exported function TraefikRouterLabels should have comment or be unexported (golint)
    • Line 54: warning: exported function TraefikServiceLabels should have comment or be unexported (golint)
    • Line 70: warning: exported function TraefikMiddlewareLabels should have comment or be unexported (golint)
    • krane/internal/utils/test/store.go
    • Line 9: warning: exported const DbPath should have comment or be unexported (golint)
    • Line 11: warning: exported function SetupDb should have comment or be unexported (golint)
    • Line 15: warning: exported function TeardownDb should have comment or be unexported (golint)
    • krane/internal/deployment/port.go
    • Line 10: warning: exported type Port should have comment or be unexported (golint)
    • Line 17: warning: exported type PortProtocol should have comment or be unexported (golint)
    • Line 20: warning: exported const TCP should have comment (or a comment on this block) or be unexported (golint)
    • krane/internal/job/job.go
    • Line 16: warning: exported type Job should have comment or be unexported (golint)
    • Line 95: warning: comment on exported type NJobs should be of the form "NJobs ..." (with optional leading article) (golint)
    • Line 98: warning: comment on exported method NJobs.MergeAndSort should be of the form "MergeAndSort ..." (golint)
    • Line 151: warning: exported function GetJobsCollectionName should have comment or be unexported (golint)
    • krane/internal/job/state.go
    • Line 3: warning: exported type State should have comment or be unexported (golint)
    • Line 6: warning: exported const Started should have comment (or a comment on this block) or be unexported (golint)
    • krane/internal/store/bolt.go
    • Line 15: warning: exported type BoltDB should have comment or be unexported (golint)
    • Line 19: warning: exported type BoltConfig should have comment or be unexported (golint)
    • Line 147: warning: exported method BoltDB.Remove should have comment or be unexported (golint)
    • Line 158: warning: exported method BoltDB.DeleteCollection should have comment or be unexported (golint)
    • Line 164: warning: exported method BoltDB.CreateCollection should have comment or be unexported (golint)
    • krane/internal/logger/logger.go
    • Line 24: warning: exported function Configure should have comment or be unexported (golint)
    • Line 46: warning: exported function Error should have comment or be unexported (golint)
    • Line 50: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 54: warning: exported function Debug should have comment or be unexported (golint)
    • Line 58: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 62: warning: exported function Info should have comment or be unexported (golint)
    • Line 66: warning: exported function Infof should have comment or be unexported (golint)
    • Line 70: warning: exported function Warn should have comment or be unexported (golint)
    • Line 74: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 78: warning: exported function Trace should have comment or be unexported (golint)
    • Line 82: warning: exported function Tracef should have comment or be unexported (golint)
    • Line 86: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 90: warning: exported function Fatalf should have comment or be unexported (golint)
    • krane/internal/docker/container.go
    • Line 16: warning: exported const ContainerDeploymentLabel should have comment or be unexported (golint)
    • Line 82: warning: comment on exported method Client.GetAllContainers should be of the form "GetAllContainers ..." (golint)
    • krane/internal/job/enqueuer.go
    • Line 5: warning: exported type Enqueuer should have comment or be unexported (golint)
    • Line 10: warning: exported function NewEnqueuer should have comment or be unexported (golint)
    • Line 14: warning: exported method Enqueuer.Enqueue should have comment or be unexported (golint)
    • krane/internal/deployment/config.go
    • Line 59: warning: comment on exported function DeSerializeConfig should be of the form "DeSerializeConfig ..." (golint)
    • Line 173: warning: comment on exported function DeleteConfig should be of the form "DeleteConfig ..." (golint)
    • krane/internal/deployment/secrets.go
    • Line 13: warning: exported type Secret should have comment or be unexported (golint)
    • Line 57: warning: comment on exported function DeleteSecretsCollection should be of the form "DeleteSecretsCollection ..." (golint)
    • Line 140: warning: exported method Secret.SerializeSecret should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words