Preparing report...

Report for github.com/RubenMateus/ready-set-go

A    Great!    Found 9 issues across 11 files

Tweet

gofmt90%

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!


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.


golint36%

Golint is a linter for Go source code.

    • ready-set-go/go-mux/web/controllers/book_controller.go
    • Line 10: warning: should not use dot imports (golint)
    • Line 20: warning: exported function GetBooks should have comment or be unexported (golint)
    • Line 26: warning: exported function GetBook should have comment or be unexported (golint)
    • Line 41: warning: exported function CreateBook should have comment or be unexported (golint)
    • Line 50: warning: exported function UpdateBook should have comment or be unexported (golint)
    • Line 67: warning: exported function DeleteBook should have comment or be unexported (golint)
    • ready-set-go/go-template/main.go
    • Line 19: warning: exported type SearchPage should have comment or be unexported (golint)
    • Line 24: warning: exported type Result should have comment or be unexported (golint)
    • Line 31: warning: exported type Book should have comment or be unexported (golint)
    • Line 40: warning: exported type User should have comment or be unexported (golint)
    • Line 47: warning: exported type BookResponse should have comment or be unexported (golint)
    • Line 98: warning: should not use basic type string as key in context.WithValue (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign54%

IneffAssign detects ineffectual assignments in Go code.

    • ready-set-go/go-mux/main.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/rubenmateus/ready-set-go/go-mux/web/router (invalid package name: "") (ineffassign)
    • ready-set-go/go-mux/web/controllers/book_controller.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/gorilla/mux (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/rubenmateus/ready-set-go/go-mux/web/models (invalid package name: "") (ineffassign)
    • Line 13: warning: undeclared name: Book (ineffassign)
    • Line 15: warning: undeclared name: Book (ineffassign)
    • Line 15: warning: undeclared name: Author (ineffassign)
    • Line 16: warning: undeclared name: Book (ineffassign)
    • Line 16: warning: undeclared name: Author (ineffassign)
    • Line 17: warning: undeclared name: Book (ineffassign)
    • Line 17: warning: undeclared name: Author (ineffassign)
    • Line 43: warning: undeclared name: Book (ineffassign)
    • Line 56: warning: undeclared name: Book (ineffassign)
    • Line 10: warning: "github.com/rubenmateus/ready-set-go/go-mux/web/models" imported but not used (ineffassign)
    • ready-set-go/go-template/main.go
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 15: warning: cannot find package "." in: (ineffassign)
    • Line 16: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: could not import github.com/jinzhu/gorm (invalid package name: "") (ineffassign)
    • Line 15: warning: could not import github.com/jinzhu/gorm/dialects/postgres (invalid package name: "") (ineffassign)
    • Line 16: warning: could not import golang.org/x/crypto/bcrypt (invalid package name: "") (ineffassign)
    • Line 93: warning: user.ID undefined (type User has no field or method ID) (ineffassign)
    • Line 132: warning: user.ID undefined (type User has no field or method ID) (ineffassign)
    • Line 146: warning: user.ID undefined (type User has no field or method ID) (ineffassign)
    • Line 176: warning: r.Context().Value("user").(User).ID undefined (type User has no field or method ID) (ineffassign)
    • ready-set-go/go-mux/web/router/router.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/gorilla/mux (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/rubenmateus/ready-set-go/go-mux/utils/logger (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!