Preparing report...

Report for github.com/openshift/imagebuilder

A+    Excellent!    Found 13 issues across 37 files

Tweet

gofmt97%

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!


golint81%

Golint is a linter for Go source code.

    • imagebuilder/dockerclient/client.go
    • Line 119: warning: comment on exported function NoAuthFn should be of the form "NoAuthFn ..." (golint)
    • Line 134: warning: exported method ClientExecutor.DefaultExcludes should have comment or be unexported (golint)
    • Line 229: warning: exported method ClientExecutor.Prepare should have comment or be unexported (golint)
    • Line 453: warning: exported method ClientExecutor.PopulateTransientMounts should have comment or be unexported (golint)
    • Line 621: warning: exported method ClientExecutor.Preserve should have comment or be unexported (golint)
    • Line 634: warning: exported method ClientExecutor.EnsureContainerPath should have comment or be unexported (golint)
    • Line 684: warning: exported method ClientExecutor.UnrecognizedInstruction should have comment or be unexported (golint)
    • Line 1054: warning: exported method ClientExecutor.Archive should have comment or be unexported (golint)
    • Line 1109: warning: exported function NewContainerVolumeTracker should have comment or be unexported (golint)
    • Line 1138: warning: exported method ContainerVolumeTracker.ReleasePath should have comment or be unexported (golint)
    • Line 1152: warning: exported method ContainerVolumeTracker.Invalidate should have comment or be unexported (golint)
    • imagebuilder/builder.go
    • Line 44: warning: exported type Executor should have comment or be unexported (golint)
    • Line 103: warning: exported type VolumeSet should have comment or be unexported (golint)
    • Line 105: warning: exported method VolumeSet.Add should have comment or be unexported (golint)
    • Line 127: warning: exported method VolumeSet.Has should have comment or be unexported (golint)
    • Line 140: warning: exported method VolumeSet.Covers should have comment or be unexported (golint)
    • Line 154: warning: exported var LogExecutor should have comment or be unexported (golint)
    • Line 158: warning: exported type Stages should have comment or be unexported (golint)
    • Line 160: warning: exported method Stages.ByName should have comment or be unexported (golint)
    • Line 169: warning: comment on exported method Stages.ByTarget should be of the form "ByTarget ..." (golint)
    • Line 182: warning: comment on exported method Stages.ThroughTarget should be of the form "ThroughTarget ..." (golint)
    • Line 195: warning: exported type Stage should have comment or be unexported (golint)
    • Line 202: warning: exported function NewStages should have comment or be unexported (golint)
    • Line 287: warning: exported type Builder should have comment or be unexported (golint)
    • Line 308: warning: exported function NewBuilder should have comment or be unexported (golint)
    • Line 327: warning: exported function ParseFile should have comment or be unexported (golint)
    • Line 516: warning: exported function SplitBy should have comment or be unexported (golint)
    • Line 591: warning: comment on exported function ParseDockerignore should be of the form "ParseDockerignore ..." (golint)

gocyclo81%

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.

    • imagebuilder/builder_test.go
    • Line 484: warning: cyclomatic complexity 23 of function TestBuilder() is high (> 15) (gocyclo)
    • Line 861: warning: cyclomatic complexity 17 of function TestParseDockerignore() is high (> 15) (gocyclo)
    • imagebuilder/dockerclient/client.go
    • Line 796: warning: cyclomatic complexity 44 of function (*ClientExecutor).CopyContainer() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 27 of function (*ClientExecutor).Prepare() is high (> 15) (gocyclo)
    • Line 696: warning: cyclomatic complexity 21 of function (*ClientExecutor).Run() is high (> 15) (gocyclo)

ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words