Preparing report...

Report for github.com/src-d/gitbase

A+    Excellent!    Found 21 issues across 83 files

Tweet

gofmt89%

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!


golint93%

Golint is a linter for Go source code.

    • gitbase/internal/function/blame.go
    • Line 15: warning: exported type BlameGenerator should have comment or be unexported (golint)
    • Line 23: warning: exported function NewBlameGenerator should have comment or be unexported (golint)
    • Line 37: warning: exported method BlameGenerator.Next should have comment or be unexported (golint)
    • Line 58: warning: exported method BlameGenerator.Close should have comment or be unexported (golint)
    • Line 94: warning: exported method Blame.WithChildren should have comment or be unexported (golint)
    • gitbase/cmd/gitbase/command/server.go
    • Line 45: warning: exported const ServerDescription should have comment (or a comment on this block) or be unexported (golint)
    • Line 98: warning: exported function NewDatabaseEngine should have comment or be unexported (golint)
    • Line 438: warning: exported var ErrInvalid should have comment or be unexported (golint)
    • gitbase/repository_pool.go
    • Line 24: warning: exported type Repository should have comment or be unexported (golint)
    • Line 32: warning: exported function NewRepository should have comment or be unexported (golint)
    • Line 45: warning: exported method Repository.ID should have comment or be unexported (golint)
    • Line 49: warning: exported method Repository.FS should have comment or be unexported (golint)
    • Line 58: warning: exported method Repository.Cache should have comment or be unexported (golint)
    • Line 62: warning: exported method Repository.Close should have comment or be unexported (golint)

gocyclo90%

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.

    • gitbase/squash_iterator.go
    • Line 677: warning: cyclomatic complexity 17 of function (*squashRepoRefsIter).Advance() is high (> 15) (gocyclo)
    • Line 815: warning: cyclomatic complexity 16 of function (*squashRemoteRefsIter).Advance() is high (> 15) (gocyclo)
    • gitbase/files.go
    • Line 229: warning: cyclomatic complexity 17 of function (*filesRowIter).Next() 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!