Preparing report...

Report for github.com/go-ap/handlers

B    Not bad!    Found 3 issues across 4 files

Tweet

gofmt75%

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!


gocyclo50%

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.

    • handlers/typer.go
    • Line 127: warning: cyclomatic complexity 22 of function (CollectionType).IRI() is high (> 15) (gocyclo)
    • Line 242: warning: cyclomatic complexity 21 of function (CollectionType).AddTo() is high (> 15) (gocyclo)

golint50%

Golint is a linter for Go source code.

    • handlers/handlers.go
    • Line 17: warning: exported var RepositoryKey should have comment or be unexported (golint)
    • Line 40: warning: exported method ActivityHandlerFn.Storage should have comment or be unexported (golint)
    • Line 143: warning: exported method CollectionHandlerFn.Storage should have comment or be unexported (golint)
    • Line 217: warning: exported method ItemHandlerFn.Storage should have comment or be unexported (golint)
    • handlers/typer.go
    • Line 12: warning: comment on exported type CollectionType should be of the form "CollectionType ..." (with optional leading article) (golint)
    • Line 15: warning: comment on exported type CollectionTypes should be of the form "CollectionTypes ..." (with optional leading article) (golint)
    • Line 19: warning: exported const Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 69: warning: exported var OnObject should have comment or be unexported (golint)
    • Line 94: warning: exported method CollectionTypes.Contains should have comment or be unexported (golint)
    • Line 217: warning: comment on exported function ValidObjectCollection should be of the form "ValidObjectCollection ..." (golint)
    • Line 232: warning: exported function ValidCollection should have comment or be unexported (golint)
    • Line 236: warning: exported function ValidCollectionIRI should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign75%

IneffAssign detects ineffectual assignments in Go code.

    • handlers/handlers.go
    • Line 67: warning: ineffectual assignment to status (ineffassign)
    • Line 69: warning: ineffectual assignment to status (ineffassign)
    • Line 169: warning: ineffectual assignment to status (ineffassign)
    • Line 172: warning: ineffectual assignment to status (ineffassign)
    • Line 243: warning: ineffectual assignment to status (ineffassign)
    • Line 245: warning: ineffectual assignment to status (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!