Preparing report...

Report for github.com/Latezly/nyaa_go

A    Great!    Found 132 issues across 217 files

Tweet

gofmt82%

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!


gocyclo94%

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.

    • nyaa_go/models/tag/helpers.go
    • Line 22: warning: cyclomatic complexity 22 of function FilterOrCreate() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 16 of function callbackOnType() is high (> 15) (gocyclo)

golint48%

Golint is a linter for Go source code.

    • nyaa_go/models/users/find.go
    • Line 12: warning: comment on exported function FindOrCreate should be of the form "FindOrCreate ..." (golint)
    • Line 28: warning: comment on exported function GetAll should be of the form "GetAll ..." (golint)
    • Line 38: warning: comment on exported function FindByEmail should be of the form "FindByEmail ..." (golint)
    • Line 47: warning: comment on exported function FindByAPIToken should be of the form "FindByAPIToken ..." (golint)
    • Line 56: warning: comment on exported function FindByAPITokenAndName should be of the form "FindByAPITokenAndName ..." (golint)
    • Line 65: warning: comment on exported function FindUsersByEmail should be of the form "FindUsersByEmail ..." (golint)
    • Line 81: warning: comment on exported function FindOldUploadsByUsername should be of the form "FindOldUploadsByUsername ..." (golint)
    • Line 118: warning: exported function SessionByID should have comment or be unexported (golint)
    • nyaa_go/controllers/pprof/pprof.go
    • Line 5: warning: package comment should be of the form "Package pprofController ..." (golint)
    • Line 47: warning: don't use MixedCaps in package name; pprofController should be pprofcontroller (golint)
    • Line 68: warning: comment on exported function PprofCmdline should be of the form "PprofCmdline ..." (golint)
    • Line 87: warning: comment on exported function PprofProfile should be of the form "PprofProfile ..." (golint)
    • Line 111: warning: comment on exported function PprofTrace should be of the form "PprofTrace ..." (golint)
    • Line 135: warning: comment on exported function PprofSymbol should be of the form "PprofSymbol ..." (golint)
    • Line 207: warning: comment on exported function PprofIndex should be of the form "PprofIndex ..." (golint)
    • nyaa_go/utils/oauth2/client/client.go
    • Line 77: warning: exported method Client.GetID should have comment or be unexported (golint)
    • Line 81: warning: exported method Client.GetRedirectURIs should have comment or be unexported (golint)
    • Line 85: warning: exported method Client.GetHashedSecret should have comment or be unexported (golint)
    • Line 89: warning: exported method Client.GetScopes should have comment or be unexported (golint)
    • Line 93: warning: exported method Client.GetGrantTypes should have comment or be unexported (golint)
    • Line 105: warning: exported method Client.GetResponseTypes should have comment or be unexported (golint)
    • Line 117: warning: exported method Client.GetOwner should have comment or be unexported (golint)
    • Line 121: warning: exported method Client.IsPublic should have comment or be unexported (golint)
    • nyaa_go/templates/template_functions.go
    • Line 202: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 232: warning: exported function GetCategoryName should have comment or be unexported (golint)
    • Line 451: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 456: warning: exported function GenSearchName should have comment or be unexported (golint)
    • nyaa_go/config/config.go
    • Line 37: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 49: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • nyaa_go/models/reports/interaction.go
    • Line 23: warning: exported function Delete should have comment or be unexported (golint)
    • Line 35: warning: exported function DeleteAll should have comment or be unexported (golint)
    • Line 78: warning: comment on exported function FindOrderBy should be of the form "FindOrderBy ..." (golint)
    • nyaa_go/utils/oauth2/manager/manager_sql.go
    • Line 19: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • Line 25: warning: exported type SQLManager should have comment or be unexported (golint)
    • Line 29: warning: exported type RichError should have comment or be unexported (golint)
    • Line 53: warning: exported method SQLManager.GetConcreteClient should have comment or be unexported (golint)
    • Line 61: warning: exported method SQLManager.GetClient should have comment or be unexported (golint)
    • Line 65: warning: exported method SQLManager.UpdateClient should have comment or be unexported (golint)
    • Line 90: warning: exported method SQLManager.Authenticate should have comment or be unexported (golint)
    • Line 103: warning: exported method SQLManager.CreateClient should have comment or be unexported (golint)
    • Line 122: warning: exported method SQLManager.DeleteClient should have comment or be unexported (golint)
    • Line 126: warning: exported method SQLManager.GetClients should have comment or be unexported (golint)
    • Line 140: warning: exported function ToClient should have comment or be unexported (golint)
    • nyaa_go/models/user.go
    • Line 32: warning: comment on exported const UserStatusJanitor should be of the form "UserStatusJanitor ..." (golint)
    • Line 240: warning: receiver name follower should be consistent with previous receiver name u for User (golint)
    • Line 459: warning: exported method User.LoadTags should have comment or be unexported (golint)
    • nyaa_go/models/torrent.go
    • Line 243: warning: exported method Torrent.ParseLanguages should have comment or be unexported (golint)
    • Line 247: warning: exported method Torrent.EncodeLanguages should have comment or be unexported (golint)
    • nyaa_go/controllers/api/api.go
    • Line 1: warning: don't use MixedCaps in package name; apiController should be apicontroller (golint)
    • Line 60: warning: comment on exported function APIHandler should be of the form "APIHandler ..." (golint)
    • Line 93: warning: comment on exported function APIViewHandler should be of the form "APIViewHandler ..." (golint)
    • Line 183: warning: comment on exported function APIViewHeadHandler should be of the form "APIViewHeadHandler ..." (golint)
    • Line 215: warning: comment on exported function APIUploadHandler should be of the form "APIUploadHandler ..." (golint)
    • Line 302: warning: comment on exported function APIUpdateHandler should be of the form "APIUpdateHandler ..." (golint)
    • Line 373: warning: comment on exported function APISearchHandler should be of the form "APISearchHandler ..." (golint)
    • Line 458: warning: comment on exported function APILoginHandler should be of the form "APILoginHandler ..." (golint)
    • Line 517: warning: comment on exported function APIProfileHandler should be of the form "APIProfileHandler ..." (golint)
    • Line 566: warning: comment on exported function APIOwnProfile should be of the form "APIOwnProfile ..." (golint)
    • nyaa_go/models/oauth_client/errors.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported type RichError should have comment or be unexported (golint)
    • Line 15: warning: exported var ErrNotFound should have comment or be unexported (golint)
    • nyaa_go/models/scrape.go
    • Line 30: warning: receiver name s should be consistent with previous receiver name t for Scrape (golint)
    • Line 48: warning: receiver name s should be consistent with previous receiver name t for Scrape (golint)
    • Line 53: warning: receiver name s should be consistent with previous receiver name t for Scrape (golint)
    • Line 58: warning: receiver name s should be consistent with previous receiver name t for Scrape (golint)
    • nyaa_go/utils/oauth2/storage/storage.go
    • Line 17: warning: exported type FositeSQLStore should have comment or be unexported (golint)
    • Line 72: warning: exported method FositeSQLStore.CreateOpenIDConnectSession should have comment or be unexported (golint)
    • Line 76: warning: exported method FositeSQLStore.GetOpenIDConnectSession should have comment or be unexported (golint)
    • Line 80: warning: exported method FositeSQLStore.DeleteOpenIDConnectSession should have comment or be unexported (golint)
    • Line 84: warning: exported method FositeSQLStore.CreateAuthorizeCodeSession should have comment or be unexported (golint)
    • Line 88: warning: exported method FositeSQLStore.GetAuthorizeCodeSession should have comment or be unexported (golint)
    • Line 92: warning: exported method FositeSQLStore.DeleteAuthorizeCodeSession should have comment or be unexported (golint)
    • Line 96: warning: exported method FositeSQLStore.CreateAccessTokenSession should have comment or be unexported (golint)
    • Line 100: warning: exported method FositeSQLStore.GetAccessTokenSession should have comment or be unexported (golint)
    • Line 104: warning: exported method FositeSQLStore.DeleteAccessTokenSession should have comment or be unexported (golint)
    • Line 108: warning: exported method FositeSQLStore.CreateRefreshTokenSession should have comment or be unexported (golint)
    • Line 112: warning: exported method FositeSQLStore.GetRefreshTokenSession should have comment or be unexported (golint)
    • Line 116: warning: exported method FositeSQLStore.DeleteRefreshTokenSession should have comment or be unexported (golint)
    • Line 120: warning: exported method FositeSQLStore.CreateImplicitAccessTokenSession should have comment or be unexported (golint)
    • Line 124: warning: exported method FositeSQLStore.PersistAuthorizeCodeGrantSession should have comment or be unexported (golint)
    • Line 142: warning: exported method FositeSQLStore.PersistRefreshTokenGrantSession should have comment or be unexported (golint)
    • Line 154: warning: exported method FositeSQLStore.RevokeRefreshToken should have comment or be unexported (golint)
    • Line 158: warning: exported method FositeSQLStore.RevokeAccessToken should have comment or be unexported (golint)
    • Line 166: warning: exported method FositeSQLStore.Authenticate should have comment or be unexported (golint)
    • nyaa_go/config/structs.go
    • Line 71: warning: exported type TagTypes should have comment or be unexported (golint)
    • Line 228: warning: exported type DefaultThemeConfig should have comment or be unexported (golint)
    • nyaa_go/models/oauth_server.go
    • Line 17: warning: exported const TableOpenID should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: don't use underscores in Go names; const oauth_prefix should be oauthPrefix (golint)
    • Line 25: warning: exported type OauthAbstract should have comment or be unexported (golint)
    • Line 36: warning: exported type OpenID should have comment or be unexported (golint)
    • Line 40: warning: exported type Access should have comment or be unexported (golint)
    • Line 44: warning: exported type Code should have comment or be unexported (golint)
    • Line 48: warning: exported type Refresh should have comment or be unexported (golint)
    • Line 52: warning: exported method OpenID.TableName should have comment or be unexported (golint)
    • Line 56: warning: exported method Access.TableName should have comment or be unexported (golint)
    • Line 60: warning: exported method Refresh.TableName should have comment or be unexported (golint)
    • Line 64: warning: exported method Code.TableName should have comment or be unexported (golint)
    • Line 68: warning: exported method OauthAbstract.ToRequest should have comment or be unexported (golint)
    • Line 100: warning: exported type Manager should have comment or be unexported (golint)
    • Line 106: warning: exported type Storage should have comment or be unexported (golint)
    • nyaa_go/models/oauth_client.go
    • Line 10: warning: exported type OauthClient should have comment or be unexported (golint)
    • Line 27: warning: exported method OauthClient.TableName should have comment or be unexported (golint)
    • Line 31: warning: exported method OauthClient.Update should have comment or be unexported (golint)
    • nyaa_go/controllers/torrent/stats.go
    • Line 1: warning: don't use MixedCaps in package name; torrentController should be torrentcontroller (golint)
    • Line 16: warning: comment on exported function GetStatsHandler should be of the form "GetStatsHandler ..." (golint)
    • nyaa_go/models/oauth_server/delete.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: exported function DeleteBySession should have comment or be unexported (golint)
    • Line 19: warning: exported function DeleteByID should have comment or be unexported (golint)
    • nyaa_go/controllers/user/profile.go
    • Line 1: warning: don't use MixedCaps in package name; userController should be usercontroller (golint)
    • Line 107: warning: exported function ContainsNonNumbersChars should have comment or be unexported (golint)
    • Line 116: warning: exported function UserGetFromName should have comment or be unexported (golint)
    • Line 155: warning: exported function RedirectToUserSearch should have comment or be unexported (golint)
    • nyaa_go/utils/feeds/rss.go
    • Line 262: warning: comment on exported method Rss.FeedXml should be of the form "FeedXml ..." (golint)
    • Line 269: warning: comment on exported method RssFeed.FeedXml should be of the form "FeedXml ..." (golint)
    • Line 277: warning: comment on exported method RssCaps.FeedXml should be of the form "FeedXml ..." (golint)
    • nyaa_go/models/oauth_server/find.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 14: warning: exported function SelectModel should have comment or be unexported (golint)
    • Line 29: warning: exported function FindBySignature should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words