Preparing report...

Report for github.com/patrickascher/gofer

A+    Excellent!    Found 49 issues across 159 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!


gocyclo88%

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.

    • gofer/orm/scope.go
    • Line 509: warning: cyclomatic complexity 23 of function SetReflectValue() is high (> 15) (gocyclo)
    • Line 758: warning: cyclomatic complexity 18 of function (scope).parseStruct() is high (> 15) (gocyclo)
    • gofer/orm/permission.go
    • Line 114: warning: cyclomatic complexity 25 of function addMandatoryFields() is high (> 15) (gocyclo)
    • Line 37: warning: cyclomatic complexity 16 of function (scope).setFieldPermission() is high (> 15) (gocyclo)
    • gofer/grid/orm.go
    • Line 375: warning: cyclomatic complexity 35 of function gridFields() is high (> 15) (gocyclo)
    • Line 120: warning: cyclomatic complexity 16 of function whitelistFields() is high (> 15) (gocyclo)
    • gofer/grid/grid.go
    • Line 324: warning: cyclomatic complexity 28 of function (*grid).Render() is high (> 15) (gocyclo)
    • Line 501: warning: cyclomatic complexity 16 of function (*grid).security() is high (> 15) (gocyclo)
    • Line 228: warning: cyclomatic complexity 16 of function (*grid).Mode() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • gofer/server/server.go
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gofer/auth/user.go
    • Line 227: warning: exported method Option.DefaultTableName should have comment or be unexported (golint)
    • Line 381: warning: exported function DeleteUserToken should have comment or be unexported (golint)
    • gofer/server/config.go
    • Line 22: warning: comment on exported type ConfigurationWebserver should be of the form "ConfigurationWebserver ..." (with optional leading article) (golint)
    • Line 33: warning: exported type ConfigurationApp should have comment or be unexported (golint)
    • Line 40: warning: exported type I18n should have comment or be unexported (golint)
    • Line 45: warning: comment on exported type ConfigurationMail should be of the form "ConfigurationMail ..." (with optional leading article) (golint)
    • Line 54: warning: comment on exported type ConfigurationAuth should be of the form "ConfigurationAuth ..." (with optional leading article) (golint)
    • Line 66: warning: comment on exported type ConfigurationRouter should be of the form "ConfigurationRouter ..." (with optional leading article) (golint)
    • Line 75: warning: exported type PatternSource should have comment or be unexported (golint)
    • Line 80: warning: exported type ConfigurationCache should have comment or be unexported (golint)
    • gofer/server/orm.go
    • Line 14: warning: exported type Orm should have comment or be unexported (golint)
    • Line 18: warning: exported method Orm.DefaultCache should have comment or be unexported (golint)
    • Line 26: warning: exported method Orm.DefaultBuilder should have comment or be unexported (golint)
    • gofer/mailer/mailer.go
    • Line 5: warning: package comment should be of the form "Package mailer ..." (golint)
    • Line 14: warning: exported var ErrMailer should have comment or be unexported (golint)
    • Line 16: warning: exported function New should have comment or be unexported (golint)
    • gofer/auth/controller/controller.go
    • Line 48: warning: comment on exported type Auth should be of the form "Auth ..." (with optional leading article) (golint)
    • Line 224: warning: exported method Auth.Roles should have comment or be unexported (golint)
    • Line 275: warning: comment on exported method Auth.Accounts should be of the form "Accounts ..." (golint)
    • gofer/auth/rbac.go
    • Line 17: warning: exported type Rbac should have comment or be unexported (golint)
    • Line 20: warning: exported method Rbac.Allowed should have comment or be unexported (golint)
    • gofer/auth/refreshToken.go
    • Line 17: warning: exported var ErrRefreshTokenNotValid should have comment or be unexported (golint)
    • Line 19: warning: exported type RefreshToken should have comment or be unexported (golint)
    • gofer/grid/history.go
    • Line 28: warning: exported const HistorySystemUser should have comment or be unexported (golint)
    • Line 30: warning: exported var ErrHistoryType should have comment or be unexported (golint)
    • Line 31: warning: exported var ErrConvertType should have comment or be unexported (golint)
    • Line 61: warning: exported method History.DefaultCache should have comment or be unexported (golint)
    • Line 69: warning: exported method History.DefaultBuilder should have comment or be unexported (golint)
    • gofer/scheduler/scheduler.go
    • Line 45: warning: comment on exported type ProviderJob should be of the form "ProviderJob ..." (with optional leading article) (golint)
    • Line 77: warning: comment on exported type ProviderJobDetail should be of the form "ProviderJobDetail ..." (with optional leading article) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign89%

IneffAssign detects ineffectual assignments in Go code.

    • gofer/query/mysql/mysql_test.go
    • Line 175: warning: ineffectual assignment to err (ineffassign)
    • Line 182: warning: ineffectual assignment to err (ineffassign)
    • Line 407: warning: ineffectual assignment to res (ineffassign)
    • Line 418: warning: ineffectual assignment to res (ineffassign)
    • Line 429: warning: ineffectual assignment to res (ineffassign)
    • Line 444: warning: ineffectual assignment to res (ineffassign)
    • Line 657: warning: ineffectual assignment to args (ineffassign)
    • Line 678: warning: ineffectual assignment to args (ineffassign)
    • Line 873: warning: ineffectual assignment to sqlStmt (ineffassign)
    • Line 986: warning: ineffectual assignment to fk (ineffassign)
    • Line 991: warning: ineffectual assignment to fk (ineffassign)
    • gofer/orm/scope_internal_test.go
    • Line 139: warning: ineffectual assignment to fields (ineffassign)
    • Line 139: warning: ineffectual assignment to rel (ineffassign)
    • Line 147: warning: ineffectual assignment to fields (ineffassign)
    • Line 147: warning: ineffectual assignment to rel (ineffassign)
    • Line 155: warning: ineffectual assignment to fields (ineffassign)
    • Line 155: warning: ineffectual assignment to rel (ineffassign)
    • Line 163: warning: ineffectual assignment to fields (ineffassign)
    • Line 163: warning: ineffectual assignment to rel (ineffassign)
    • Line 171: warning: ineffectual assignment to fields (ineffassign)
    • Line 171: warning: ineffectual assignment to rel (ineffassign)
    • Line 179: warning: ineffectual assignment to fields (ineffassign)
    • Line 179: warning: ineffectual assignment to rel (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!