Preparing report...

Report for github.com/goharbor/harbor

A+    Excellent!    Found 120 issues across 1316 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!


golint97%

Golint is a linter for Go source code.

    • harbor/src/testing/apitests/apilib/harborapi.go
    • Line 1: warning: package comment should be of the form "Package apilib ..." (golint)
    • Line 14: warning: exported type HarborAPI should have comment or be unexported (golint)
    • Line 18: warning: exported function NewHarborAPI should have comment or be unexported (golint)
    • Line 24: warning: exported function NewHarborAPIWithBasePath should have comment or be unexported (golint)
    • Line 30: warning: exported type UsrInfo should have comment or be unexported (golint)
    • Line 35: warning: comment on exported method HarborAPI.SearchGet should be of the form "SearchGet ..." (golint)
    • Line 81: warning: comment on exported method HarborAPI.ProjectsPost should be of the form "ProjectsPost ..." (golint)
    • Line 116: warning: comment on exported method HarborAPI.RepositoriesDelete should be of the form "RepositoriesDelete ..." (golint)

gocyclo96%

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.

    • harbor/src/controller/scan/base_controller.go
    • Line 313: warning: cyclomatic complexity 18 of function (*basicController).startScanAll() is high (> 15) (gocyclo)
    • Line 184: warning: cyclomatic complexity 18 of function (*basicController).Scan() is high (> 15) (gocyclo)
    • Line 572: warning: cyclomatic complexity 17 of function (*basicController).GetScanLog() is high (> 15) (gocyclo)
    • Line 666: warning: cyclomatic complexity 17 of function (*basicController).GetVulnerable() is high (> 15) (gocyclo)

ineffassign95%

IneffAssign detects ineffectual assignments in Go code.

    • harbor/src/jobservice/config/config_test.go
    • Line 129: warning: ineffectual assignment to err (ineffassign)
    • Line 130: warning: ineffectual assignment to err (ineffassign)
    • Line 131: warning: ineffectual assignment to err (ineffassign)
    • Line 132: warning: ineffectual assignment to err (ineffassign)
    • Line 133: warning: ineffectual assignment to err (ineffassign)
    • Line 134: warning: ineffectual assignment to err (ineffassign)
    • Line 135: warning: ineffectual assignment to err (ineffassign)
    • Line 136: warning: ineffectual assignment to err (ineffassign)
    • Line 137: warning: ineffectual assignment to err (ineffassign)
    • Line 138: warning: ineffectual assignment to err (ineffassign)
    • Line 145: warning: ineffectual assignment to err (ineffassign)
    • Line 146: warning: ineffectual assignment to err (ineffassign)
    • Line 147: warning: ineffectual assignment to err (ineffassign)
    • Line 148: warning: ineffectual assignment to err (ineffassign)
    • Line 149: warning: ineffectual assignment to err (ineffassign)
    • Line 150: warning: ineffectual assignment to err (ineffassign)
    • Line 151: warning: ineffectual assignment to err (ineffassign)
    • Line 152: warning: ineffectual assignment to err (ineffassign)
    • Line 153: warning: ineffectual assignment to err (ineffassign)
    • harbor/src/server/v2.0/handler/artifact_test.go
    • Line 51: warning: ineffectual assignment to repository (ineffassign)
    • Line 51: warning: ineffectual assignment to reference (ineffassign)
    • Line 56: warning: ineffectual assignment to repository (ineffassign)
    • Line 56: warning: ineffectual assignment to reference (ineffassign)
    • Line 61: warning: ineffectual assignment to repository (ineffassign)
    • Line 61: warning: ineffectual assignment to reference (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!