Preparing report...

Report for github.com/kubesphere/s2irun

A+    Excellent!    Found 21 issues across 107 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!


gocyclo89%

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.

    • s2irun/pkg/tar/tar_test.go
    • Line 73: warning: cyclomatic complexity 30 of function verifyTarFile() is high (> 15) (gocyclo)
    • Line 406: warning: cyclomatic complexity 19 of function verifyDirectory() is high (> 15) (gocyclo)
    • s2irun/pkg/tar/tar.go
    • Line 331: warning: cyclomatic complexity 18 of function (*stiTar).ExtractTarStreamFromTarReader() is high (> 15) (gocyclo)
    • s2irun/pkg/build/strategies/sti/sti.go
    • Line 283: warning: cyclomatic complexity 31 of function (*STI).Prepare() is high (> 15) (gocyclo)
    • Line 190: warning: cyclomatic complexity 16 of function (*STI).Build() is high (> 15) (gocyclo)
    • Line 591: warning: cyclomatic complexity 16 of function (*STI).Execute() is high (> 15) (gocyclo)
    • s2irun/pkg/docker/docker.go
    • Line 969: warning: cyclomatic complexity 33 of function (*stiDocker).RunContainer() is high (> 15) (gocyclo)
    • Line 536: warning: cyclomatic complexity 17 of function (*stiDocker).PullImage() is high (> 15) (gocyclo)
    • Line 628: warning: cyclomatic complexity 16 of function (*stiDocker).PushImage() is high (> 15) (gocyclo)

golint89%

Golint is a linter for Go source code.

    • s2irun/pkg/outputresult/output.go
    • Line 20: warning: exported var Retry should have comment or be unexported (golint)
    • Line 29: warning: exported function OutputResult should have comment or be unexported (golint)
    • Line 50: warning: exported function AddBuildResultToAnnotation should have comment or be unexported (golint)
    • s2irun/pkg/run/s2i.go
    • Line 19: warning: exported const ConfigEnvVariable should have comment (or a comment on this block) or be unexported (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 94: warning: exported function App should have comment or be unexported (golint)
    • s2irun/pkg/api/types.go
    • Line 53: warning: comment on exported const CommandPull should be of the form "CommandPull ..." (golint)
    • Line 56: warning: comment on exported const DefaultBranch should be of the form "DefaultBranch ..." (golint)
    • Line 326: warning: exported method Config.DeepCopy should have comment or be unexported (golint)
    • Line 435: warning: exported type SourceInfo should have comment or be unexported (golint)
    • Line 449: warning: exported type OutputResultInfo should have comment or be unexported (golint)
    • Line 584: warning: comment on exported type ImageInfo should be of the form "ImageInfo ..." (with optional leading article) (golint)
    • Line 743: warning: exported function Parse should have comment or be unexported (golint)
    • s2irun/pkg/utils/bytefmt/bytes.go
    • Line 16: warning: exported const BYTE should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: error var invalidByteQuantityError should have name of the form errFoo (golint)
    • s2irun/pkg/utils/stringutils/string.go
    • Line 7: warning: comment on exported function Diff should be of the form "Diff ..." (golint)
    • Line 21: warning: exported function Unique should have comment or be unexported (golint)
    • Line 32: warning: exported function FindString should have comment or be unexported (golint)
    • Line 41: warning: exported function StringIn should have comment or be unexported (golint)
    • Line 45: warning: exported function Reverse should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words