Preparing report...

Report for github.com/cnrancher/hangar

(v1.7.1)

A+    Excellent!    Found 14 issues across 63 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!


gocyclo77%

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.

    • pkg/source/source.go
    • Line 539: warning: cyclomatic complexity 30 of function (*Source).ImageBySet() is high (> 15) (gocyclo)
    • Line 440: warning: cyclomatic complexity 20 of function (*Source).initManifest() is high (> 15) (gocyclo)
    • pkg/source/copy.go
    • Line 158: warning: cyclomatic complexity 25 of function (*Source).copyMediaTypeImageIndex() is high (> 15) (gocyclo)
    • Line 28: warning: cyclomatic complexity 24 of function (*Source).copyDockerV2ListMediaType() is high (> 15) (gocyclo)
    • Line 348: warning: cyclomatic complexity 19 of function (*Source).copyDockerV2Schema1MediaType() is high (> 15) (gocyclo)
    • pkg/commands/generatelist.go
    • Line 228: warning: cyclomatic complexity 21 of function (*generateListCmd).finish() is high (> 15) (gocyclo)
    • Line 133: warning: cyclomatic complexity 18 of function (*generateListCmd).prepareGenerator() is high (> 15) (gocyclo)
    • pkg/hangar/loader.go
    • Line 258: warning: cyclomatic complexity 30 of function (*Loader).worker() is high (> 15) (gocyclo)
    • Line 523: warning: cyclomatic complexity 20 of function (*Loader).validateWorker() is high (> 15) (gocyclo)

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!


misspell98%

Misspell Finds commonly misspelled English words