Preparing report...

Report for github.com/casbin/casdoor

A    Great!    Found 63 issues across 74 files

Tweet

gofmt85%

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!


gocyclo93%

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.


golint14%

Golint is a linter for Go source code.

    • casdoor/controllers/auth.go
    • Line 33: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 38: warning: exported method ApiController.HandleLoggedIn should have comment or be unexported (golint)
    • Line 75: warning: comment on exported method ApiController.GetApplicationLogin should be of the form "GetApplicationLogin ..." (golint)
    • Line 111: warning: comment on exported method ApiController.Login should be of the form "Login ..." (golint)
    • casdoor/controllers/organization.go
    • Line 23: warning: comment on exported method ApiController.GetOrganizations should be of the form "GetOrganizations ..." (golint)
    • Line 35: warning: comment on exported method ApiController.GetOrganization should be of the form "GetOrganization ..." (golint)
    • Line 47: warning: comment on exported method ApiController.UpdateOrganization should be of the form "UpdateOrganization ..." (golint)
    • Line 66: warning: comment on exported method ApiController.AddOrganization should be of the form "AddOrganization ..." (golint)
    • Line 82: warning: comment on exported method ApiController.DeleteOrganization should be of the form "DeleteOrganization ..." (golint)
    • casdoor/idp/facebook.go
    • Line 29: warning: exported type FacebookIdProvider should have comment or be unexported (golint)
    • Line 34: warning: exported function NewFacebookIdProvider should have comment or be unexported (golint)
    • Line 43: warning: exported method FacebookIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 64: warning: exported type FacebookAccessToken should have comment or be unexported (golint)
    • Line 70: warning: exported type FacebookCheckToken should have comment or be unexported (golint)
    • Line 74: warning: comment on exported type FacebookCheckTokenData should be of the form "FacebookCheckTokenData ..." (with optional leading article) (golint)
    • Line 124: warning: exported type FacebookUserInfo should have comment or be unexported (golint)
    • Line 174: warning: exported method FacebookIdProvider.GetUrlResp should have comment or be unexported (golint)
    • casdoor/object/token_jwt.go
    • Line 25: warning: exported type Claims should have comment or be unexported (golint)
    • Line 75: warning: exported function ParseJwtToken should have comment or be unexported (golint)
    • casdoor/object/verification.go
    • Line 27: warning: exported type VerificationRecord should have comment or be unexported (golint)
    • Line 42: warning: exported function SendVerificationCodeToEmail should have comment or be unexported (golint)
    • Line 60: warning: exported function SendVerificationCodeToPhone should have comment or be unexported (golint)
    • Line 73: warning: exported function AddToVerificationRecord should have comment or be unexported (golint)
    • Line 124: warning: exported function CheckVerificationCode should have comment or be unexported (golint)
    • Line 148: warning: exported function DisableVerificationCode should have comment or be unexported (golint)
    • casdoor/util/json.go
    • Line 19: warning: exported function StructToJson should have comment or be unexported (golint)
    • Line 29: warning: exported function JsonToStruct should have comment or be unexported (golint)
    • casdoor/controllers/base.go
    • Line 24: warning: exported type ApiController should have comment or be unexported (golint)
    • Line 28: warning: exported type SessionData should have comment or be unexported (golint)
    • Line 32: warning: exported method ApiController.GetSessionUsername should have comment or be unexported (golint)
    • Line 51: warning: exported method ApiController.SetSessionUsername should have comment or be unexported (golint)
    • Line 55: warning: exported method ApiController.GetSessionData should have comment or be unexported (golint)
    • Line 70: warning: exported method ApiController.SetSessionData should have comment or be unexported (golint)
    • Line 82: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • casdoor/object/ldap.go
    • Line 26: warning: exported type Ldap should have comment or be unexported (golint)
    • Line 68: warning: exported type LdapRespUser should have comment or be unexported (golint)
    • Line 80: warning: exported function GetLdapConn should have comment or be unexported (golint)
    • Line 200: warning: exported function AddLdap should have comment or be unexported (golint)
    • Line 217: warning: exported function CheckLdapExist should have comment or be unexported (golint)
    • Line 238: warning: exported function GetLdaps should have comment or be unexported (golint)
    • Line 248: warning: exported function GetLdap should have comment or be unexported (golint)
    • Line 261: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 266: warning: exported function UpdateLdap should have comment or be unexported (golint)
    • Line 280: warning: exported function DeleteLdap should have comment or be unexported (golint)
    • Line 289: warning: exported function SyncLdapUsers should have comment or be unexported (golint)
    • Line 331: warning: exported function UpdateLdapSyncTime should have comment or be unexported (golint)
    • Line 338: warning: exported function CheckLdapUuidExist should have comment or be unexported (golint)
    • casdoor/routers/authz_filter.go
    • Line 30: warning: exported type Object should have comment or be unexported (golint)
    • Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 124: warning: exported function AuthzFilter should have comment or be unexported (golint)
    • casdoor/controllers/record.go
    • Line 23: warning: comment on exported method ApiController.GetRecords should be of the form "GetRecords ..." (golint)
    • Line 32: warning: comment on exported method ApiController.GetRecordsByFilter should be of the form "GetRecordsByFilter ..." (golint)
    • casdoor/idp/gitee.go
    • Line 32: warning: exported type GiteeIdProvider should have comment or be unexported (golint)
    • Line 37: warning: exported function NewGiteeIdProvider should have comment or be unexported (golint)
    • Line 46: warning: exported method GiteeIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 68: warning: exported type GiteeAccessToken should have comment or be unexported (golint)
    • Line 149: warning: exported type GiteeUserResponse should have comment or be unexported (golint)
    • Line 210: warning: exported method GiteeIdProvider.GetUrlResp should have comment or be unexported (golint)
    • casdoor/idp/linkedin.go
    • Line 30: warning: exported type LinkedInIdProvider should have comment or be unexported (golint)
    • Line 35: warning: exported function NewLinkedInIdProvider should have comment or be unexported (golint)
    • Line 44: warning: exported method LinkedInIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 65: warning: exported type LinkedInAccessToken should have comment or be unexported (golint)
    • Line 187: warning: exported type LinkedInUserInfo should have comment or be unexported (golint)
    • Line 264: warning: exported type LinkedInUserEmail should have comment or be unexported (golint)
    • Line 311: warning: exported method LinkedInIdProvider.GetUrlRespWithAuthorization should have comment or be unexported (golint)
    • casdoor/util/log.go
    • Line 26: warning: exported function GetIPInfo should have comment or be unexported (golint)
    • Line 47: warning: exported function GetIPFromRequest should have comment or be unexported (golint)
    • Line 64: warning: exported function LogInfo should have comment or be unexported (golint)
    • Line 69: warning: exported function LogWarning should have comment or be unexported (golint)
    • casdoor/controllers/link.go
    • Line 23: warning: exported type LinkForm should have comment or be unexported (golint)
    • Line 27: warning: exported method ApiController.Unlink should have comment or be unexported (golint)
    • casdoor/controllers/service.go
    • Line 28: warning: comment on exported method ApiController.SendEmail should be of the form "SendEmail ..." (golint)
    • Line 97: warning: comment on exported method ApiController.SendSms should be of the form "SendSms ..." (golint)
    • casdoor/controllers/token.go
    • Line 23: warning: comment on exported method ApiController.GetTokens should be of the form "GetTokens ..." (golint)
    • Line 35: warning: comment on exported method ApiController.GetToken should be of the form "GetToken ..." (golint)
    • Line 47: warning: comment on exported method ApiController.UpdateToken should be of the form "UpdateToken ..." (golint)
    • Line 66: warning: comment on exported method ApiController.AddToken should be of the form "AddToken ..." (golint)
    • Line 82: warning: comment on exported method ApiController.DeleteToken should be of the form "DeleteToken ..." (golint)
    • Line 98: warning: comment on exported method ApiController.GetOAuthToken should be of the form "GetOAuthToken ..." (golint)
    • casdoor/idp/github.go
    • Line 28: warning: exported type GithubIdProvider should have comment or be unexported (golint)
    • Line 33: warning: exported function NewGithubIdProvider should have comment or be unexported (golint)
    • Line 45: warning: exported method GithubIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 63: warning: exported method GithubIdProvider.GetToken should have comment or be unexported (golint)
    • Line 115: warning: exported type GitHubUserInfo should have comment or be unexported (golint)
    • Line 162: warning: exported method GithubIdProvider.GetUserInfo should have comment or be unexported (golint)
    • casdoor/idp/dingtalk.go
    • Line 46: warning: exported type DingTalkIdProvider should have comment or be unexported (golint)
    • Line 51: warning: exported function NewDingTalkIdProvider should have comment or be unexported (golint)
    • Line 60: warning: exported method DingTalkIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 85: warning: exported type DingTalkAccessToken should have comment or be unexported (golint)
    • Line 92: warning: exported type DingTalkIds should have comment or be unexported (golint)
    • Line 97: warning: exported type InfoResp should have comment or be unexported (golint)
    • Line 139: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 154: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 176: warning: exported type UnionIdResponse should have comment or be unexported (golint)
    • Line 186: warning: exported method DingTalkIdProvider.GetUseridByUnionid should have comment or be unexported (golint)
    • Line 198: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 249: warning: exported type DingTalkUserResponse should have comment or be unexported (golint)
    • Line 329: warning: exported method DingTalkIdProvider.GetUrlResp should have comment or be unexported (golint)
    • casdoor/idp/wechat.go
    • Line 29: warning: exported type WeChatIdProvider should have comment or be unexported (golint)
    • Line 34: warning: exported function NewWeChatIdProvider should have comment or be unexported (golint)
    • Line 43: warning: exported method WeChatIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 64: warning: exported type WechatAccessToken should have comment or be unexported (golint)
    • Line 133: warning: exported type WechatUserInfo should have comment or be unexported (golint)
    • casdoor/object/user.go
    • Line 24: warning: exported type User should have comment or be unexported (golint)
    • Line 65: warning: exported function GetGlobalUsers should have comment or be unexported (golint)
    • Line 75: warning: exported function GetUsers should have comment or be unexported (golint)
    • Line 98: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 103: warning: exported function GetUser should have comment or be unexported (golint)
    • Line 108: warning: exported function GetMaskedUser should have comment or be unexported (golint)
    • Line 119: warning: exported function GetPrivateUser should have comment or be unexported (golint)
    • Line 178: warning: exported function GetMaskedUsers should have comment or be unexported (golint)
    • Line 185: warning: exported function GetLastUser should have comment or be unexported (golint)
    • Line 194: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 199: warning: exported function UpdateUser should have comment or be unexported (golint)
    • Line 217: warning: exported function UpdateUserInternal should have comment or be unexported (golint)
    • Line 233: warning: exported function UpdateUserForOriginal should have comment or be unexported (golint)
    • Line 242: warning: exported function AddUser should have comment or be unexported (golint)
    • Line 261: warning: exported function AddUsers should have comment or be unexported (golint)
    • Line 282: warning: exported function AddUsersSafe should have comment or be unexported (golint)
    • Line 307: warning: exported function DeleteUser should have comment or be unexported (golint)
    • Line 316: warning: exported function LinkUserAccount should have comment or be unexported (golint)
    • Line 320: warning: exported method User.GetId should have comment or be unexported (golint)
    • casdoor/authz/authz.go
    • Line 25: warning: exported var Enforcer should have comment or be unexported (golint)
    • Line 27: warning: exported function InitAuthz should have comment or be unexported (golint)
    • Line 112: warning: exported function IsAllowed should have comment or be unexported (golint)
    • casdoor/controllers/application.go
    • Line 23: warning: comment on exported method ApiController.GetApplications should be of the form "GetApplications ..." (golint)
    • Line 35: warning: comment on exported method ApiController.GetApplication should be of the form "GetApplication ..." (golint)
    • Line 47: warning: comment on exported method ApiController.GetUserApplication should be of the form "GetUserApplication ..." (golint)
    • Line 64: warning: comment on exported method ApiController.UpdateApplication should be of the form "UpdateApplication ..." (golint)
    • Line 83: warning: comment on exported method ApiController.AddApplication should be of the form "AddApplication ..." (golint)
    • Line 99: warning: comment on exported method ApiController.DeleteApplication should be of the form "DeleteApplication ..." (golint)
    • casdoor/idp/wecom.go
    • Line 29: warning: exported type WeComIdProvider should have comment or be unexported (golint)
    • Line 34: warning: exported function NewWeComIdProvider should have comment or be unexported (golint)
    • Line 43: warning: exported method WeComIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 64: warning: exported type WeComProviderToken should have comment or be unexported (golint)
    • Line 131: warning: exported type WeComUserInfo should have comment or be unexported (golint)
    • casdoor/object/email.go
    • Line 21: warning: exported function SendEmail should have comment or be unexported (golint)
    • Line 33: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • casdoor/controllers/verification.go
    • Line 36: warning: exported method ApiController.SendVerificationCode should have comment or be unexported (golint)
    • Line 100: warning: exported method ApiController.ResetEmailOrPhone should have comment or be unexported (golint)
    • casdoor/object/check.go
    • Line 30: warning: exported function CheckUserSignup should have comment or be unexported (golint)
    • Line 84: warning: exported function CheckPassword should have comment or be unexported (golint)
    • Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 96: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 104: warning: exported function CheckUserLogin should have comment or be unexported (golint)
    • casdoor/object/provider_item.go
    • Line 17: warning: exported type ProviderItem should have comment or be unexported (golint)
    • Line 27: warning: exported method Application.GetProviderItem should have comment or be unexported (golint)
    • casdoor/object/storage.go
    • Line 117: warning: exported function UploadAvatar should have comment or be unexported (golint)
    • Line 134: warning: exported function GetAvatarPath should have comment or be unexported (golint)
    • casdoor/object/token.go
    • Line 24: warning: exported type Code should have comment or be unexported (golint)
    • Line 29: warning: exported type Token should have comment or be unexported (golint)
    • Line 45: warning: exported type TokenWrapper should have comment or be unexported (golint)
    • Line 52: warning: exported function GetTokens should have comment or be unexported (golint)
    • Line 75: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 94: warning: exported function GetToken should have comment or be unexported (golint)
    • Line 99: warning: exported function UpdateToken should have comment or be unexported (golint)
    • Line 113: warning: exported function AddToken should have comment or be unexported (golint)
    • Line 122: warning: exported function DeleteToken should have comment or be unexported (golint)
    • Line 131: warning: exported function CheckOAuthLogin should have comment or be unexported (golint)
    • Line 155: warning: exported function GetOAuthCode should have comment or be unexported (golint)
    • Line 198: warning: exported function GetOAuthToken should have comment or be unexported (golint)
    • casdoor/controllers/util.go
    • Line 27: warning: exported function InitHttpClient should have comment or be unexported (golint)
    • Line 57: warning: exported method ApiController.ResponseError should have comment or be unexported (golint)
    • Line 70: warning: exported method ApiController.ResponseErrorWithData should have comment or be unexported (golint)
    • Line 75: warning: exported method ApiController.RequireSignedIn should have comment or be unexported (golint)
    • casdoor/idp/google.go
    • Line 28: warning: exported type GoogleIdProvider should have comment or be unexported (golint)
    • Line 33: warning: exported function NewGoogleIdProvider should have comment or be unexported (golint)
    • Line 45: warning: exported method GoogleIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 63: warning: exported method GoogleIdProvider.GetToken should have comment or be unexported (golint)
    • Line 79: warning: exported type GoogleUserInfo should have comment or be unexported (golint)
    • Line 90: warning: exported method GoogleIdProvider.GetUserInfo should have comment or be unexported (golint)
    • casdoor/idp/weibo.go
    • Line 31: warning: exported type WeiBoIdProvider should have comment or be unexported (golint)
    • Line 36: warning: exported function NewWeiBoIdProvider should have comment or be unexported (golint)
    • Line 45: warning: exported method WeiBoIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 66: warning: exported type WeiboAccessToken should have comment or be unexported (golint)
    • Line 162: warning: exported type WeiboUserinfo should have comment or be unexported (golint)
    • Line 247: warning: exported method WeiBoIdProvider.GetUrlResp should have comment or be unexported (golint)
    • casdoor/original/affiliation.go
    • Line 17: warning: exported type Affiliation should have comment or be unexported (golint)
    • Line 22: warning: exported method Affiliation.TableName should have comment or be unexported (golint)
    • casdoor/util/regex.go
    • Line 29: warning: exported function IsEmailValid should have comment or be unexported (golint)
    • Line 34: warning: exported function IsPhoneCnValid should have comment or be unexported (golint)
    • casdoor/idp/qq.go
    • Line 29: warning: exported type QqIdProvider should have comment or be unexported (golint)
    • Line 34: warning: exported function NewQqIdProvider should have comment or be unexported (golint)
    • Line 46: warning: exported method QqIdProvider.SetHttpClient should have comment or be unexported (golint)
    • Line 63: warning: exported method QqIdProvider.GetToken should have comment or be unexported (golint)
    • Line 115: warning: exported type QqUserInfo should have comment or be unexported (golint)
    • Line 140: warning: exported method QqIdProvider.GetUserInfo should have comment or be unexported (golint)
    • Line 176: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • casdoor/object/captcha.go
    • Line 23: warning: exported function GetCaptcha should have comment or be unexported (golint)
    • Line 36: warning: exported function VerifyCaptcha should have comment or be unexported (golint)
    • casdoor/object/user_util.go
    • Line 26: warning: exported function GetUserByField should have comment or be unexported (golint)
    • Line 39: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 44: warning: exported function HasUserByField should have comment or be unexported (golint)
    • Line 48: warning: exported function GetUserByFields should have comment or be unexported (golint)
    • Line 70: warning: exported function SetUserField should have comment or be unexported (golint)
    • Line 92: warning: exported function GetUserField should have comment or be unexported (golint)
    • Line 107: warning: exported function SetUserOAuthProperties should have comment or be unexported (golint)
    • Line 142: warning: exported function ClearUserOAuthProperties should have comment or be unexported (golint)
    • casdoor/util/string.go
    • Line 28: warning: exported function ParseInt should have comment or be unexported (golint)
    • Line 37: warning: exported function GetOwnerAndNameFromId should have comment or be unexported (golint)
    • Line 46: warning: exported function GenerateId should have comment or be unexported (golint)
    • Line 50: warning: exported function GetId should have comment or be unexported (golint)
    • Line 54: warning: exported function GetMd5Hash should have comment or be unexported (golint)
    • Line 59: warning: exported function IsStrsEmpty should have comment or be unexported (golint)
    • Line 68: warning: exported function GetMaxLenStr should have comment or be unexported (golint)
    • Line 81: warning: exported function GetMinLenStr should have comment or be unexported (golint)
    • casdoor/controllers/user.go
    • Line 26: warning: comment on exported method ApiController.GetGlobalUsers should be of the form "GetGlobalUsers ..." (golint)
    • Line 35: warning: comment on exported method ApiController.GetUsers should be of the form "GetUsers ..." (golint)
    • Line 47: warning: comment on exported method ApiController.GetUser should be of the form "GetUser ..." (golint)
    • Line 68: warning: comment on exported method ApiController.UpdateUser should be of the form "UpdateUser ..." (golint)
    • Line 98: warning: comment on exported method ApiController.AddUser should be of the form "AddUser ..." (golint)
    • Line 114: warning: comment on exported method ApiController.DeleteUser should be of the form "DeleteUser ..." (golint)
    • Line 130: warning: comment on exported method ApiController.GetEmailAndPhone should be of the form "GetEmailAndPhone ..." (golint)
    • Line 168: warning: comment on exported method ApiController.SetPassword should be of the form "SetPassword ..." (golint)
    • casdoor/object/organization.go
    • Line 22: warning: exported type Organization should have comment or be unexported (golint)
    • Line 37: warning: exported function GetOrganizations should have comment or be unexported (golint)
    • Line 60: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 65: warning: exported function GetOrganization should have comment or be unexported (golint)
    • Line 70: warning: exported function UpdateOrganization should have comment or be unexported (golint)
    • Line 84: warning: exported function AddOrganization should have comment or be unexported (golint)
    • Line 93: warning: exported function DeleteOrganization should have comment or be unexported (golint)
    • Line 102: warning: exported function GetOrganizationByUser should have comment or be unexported (golint)
    • casdoor/controllers/ldap.go
    • Line 23: warning: exported type LdapServer should have comment or be unexported (golint)
    • Line 31: warning: exported type LdapResp should have comment or be unexported (golint)
    • Line 41: warning: exported type LdapSyncResp should have comment or be unexported (golint)
    • Line 46: warning: exported method ApiController.GetLdapUser should have comment or be unexported (golint)
    • Line 103: warning: exported method ApiController.GetLdaps should have comment or be unexported (golint)
    • Line 110: warning: exported method ApiController.GetLdap should have comment or be unexported (golint)
    • Line 122: warning: exported method ApiController.AddLdap should have comment or be unexported (golint)
    • Line 150: warning: exported method ApiController.UpdateLdap should have comment or be unexported (golint)
    • Line 168: warning: exported method ApiController.DeleteLdap should have comment or be unexported (golint)
    • Line 179: warning: exported method ApiController.SyncLdapUsers should have comment or be unexported (golint)
    • Line 198: warning: exported method ApiController.CheckLdapUsersExist should have comment or be unexported (golint)
    • casdoor/object/application.go
    • Line 22: warning: exported type Application should have comment or be unexported (golint)
    • Line 49: warning: exported function GetApplications should have comment or be unexported (golint)
    • Line 101: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 106: warning: exported function GetApplicationByOrganizationName should have comment or be unexported (golint)
    • Line 117: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 122: warning: exported function GetApplicationByUser should have comment or be unexported (golint)
    • Line 125: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 130: warning: exported function GetApplicationByClientId should have comment or be unexported (golint)
    • Line 141: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 146: warning: exported function GetApplicationByClientIdAndSecret should have comment or be unexported (golint)
    • Line 159: warning: exported function GetApplication should have comment or be unexported (golint)
    • Line 164: warning: exported function UpdateApplication should have comment or be unexported (golint)
    • Line 182: warning: exported function AddApplication should have comment or be unexported (golint)
    • Line 197: warning: exported function DeleteApplication should have comment or be unexported (golint)
    • casdoor/object/organization_item.go
    • Line 3: warning: exported type AccountItem should have comment or be unexported (golint)
    • Line 20: warning: exported method Organization.IsAccountItemEnabled should have comment or be unexported (golint)
    • Line 24: warning: exported method Organization.IsAccountItemVisible should have comment or be unexported (golint)
    • Line 33: warning: exported method Organization.IsAccountItemRequired should have comment or be unexported (golint)
    • Line 42: warning: exported method Organization.IsAccountItemEditable should have comment or be unexported (golint)
    • Line 51: warning: exported method Organization.GetAccountItemPublic should have comment or be unexported (golint)
    • casdoor/object/record.go
    • Line 21: warning: exported type Records should have comment or be unexported (golint)
    • Line 26: warning: exported function AddRecord should have comment or be unexported (golint)
    • Line 38: warning: exported function GetRecordCount should have comment or be unexported (golint)
    • Line 47: warning: exported function GetRecords should have comment or be unexported (golint)
    • Line 57: warning: exported function GetRecordsByField should have comment or be unexported (golint)
    • casdoor/object/user_cred.go
    • Line 29: warning: exported method User.UpdateUserHash should have comment or be unexported (golint)
    • Line 34: warning: exported method User.UpdateUserPassword should have comment or be unexported (golint)
    • casdoor/original/public_api.go
    • Line 33: warning: exported function AddUserToOriginalDatabase should have comment or be unexported (golint)
    • Line 47: warning: exported function UpdateUserToOriginalDatabase should have comment or be unexported (golint)
    • casdoor/util/random.go
    • Line 19: warning: exported function GenerateClientId should have comment or be unexported (golint)
    • Line 23: warning: exported function GenerateClientSecret should have comment or be unexported (golint)
    • casdoor/object/application_item.go
    • Line 17: warning: exported type SignupItem should have comment or be unexported (golint)
    • Line 45: warning: exported method Application.GetEmailProvider should have comment or be unexported (golint)
    • Line 49: warning: exported method Application.GetSmsProvider should have comment or be unexported (golint)
    • Line 53: warning: exported method Application.GetStorageProvider should have comment or be unexported (golint)
    • Line 66: warning: exported method Application.IsSignupItemEnabled should have comment or be unexported (golint)
    • Line 70: warning: exported method Application.IsSignupItemVisible should have comment or be unexported (golint)
    • Line 79: warning: exported method Application.GetSignupItemRule should have comment or be unexported (golint)
    • Line 107: warning: exported method Application.HasPromptPage should have comment or be unexported (golint)
    • casdoor/object/provider.go
    • Line 24: warning: exported type Provider should have comment or be unexported (golint)
    • Line 65: warning: exported function GetProviders should have comment or be unexported (golint)
    • Line 88: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 93: warning: exported function GetProvider should have comment or be unexported (golint)
    • Line 98: warning: exported function GetDefaultHumanCheckProvider should have comment or be unexported (golint)
    • Line 112: warning: exported function UpdateProvider should have comment or be unexported (golint)
    • Line 126: warning: exported function AddProvider should have comment or be unexported (golint)
    • Line 135: warning: exported function DeleteProvider should have comment or be unexported (golint)
    • Line 144: warning: exported method Provider.GetId should have comment or be unexported (golint)
    • casdoor/util/record.go
    • Line 23: warning: exported type Record should have comment or be unexported (golint)
    • Line 32: warning: exported function Records should have comment or be unexported (golint)
    • casdoor/util/time.go
    • Line 22: warning: exported function GetCurrentTime should have comment or be unexported (golint)
    • Line 28: warning: exported function GetCurrentUnixTime should have comment or be unexported (golint)
    • casdoor/controllers/account.go
    • Line 30: warning: exported const ResponseTypeLogin should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type RequestForm should have comment or be unexported (golint)
    • Line 60: warning: exported type Response should have comment or be unexported (golint)
    • Line 67: warning: exported type HumanCheck should have comment or be unexported (golint)
    • Line 75: warning: comment on exported method ApiController.Signup should be of the form "Signup ..." (golint)
    • Line 181: warning: comment on exported method ApiController.Logout should be of the form "Logout ..." (golint)
    • Line 200: warning: comment on exported method ApiController.GetAccount should be of the form "GetAccount ..." (golint)
    • Line 227: warning: comment on exported method ApiController.UploadAvatar should be of the form "UploadAvatar ..." (golint)
    • Line 269: warning: exported method ApiController.GetHumanCheck should have comment or be unexported (golint)
    • casdoor/idp/provider.go
    • Line 23: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 31: warning: exported type IdProvider should have comment or be unexported (golint)
    • Line 37: warning: exported function GetIdProvider should have comment or be unexported (golint)
    • casdoor/object/adapter.go
    • Line 29: warning: exported function InitConfig should have comment or be unexported (golint)
    • Line 38: warning: exported function InitAdapter should have comment or be unexported (golint)
    • casdoor/controllers/provider.go
    • Line 23: warning: comment on exported method ApiController.GetProviders should be of the form "GetProviders ..." (golint)
    • Line 35: warning: comment on exported method ApiController.GetProvider should be of the form "GetProvider ..." (golint)
    • Line 47: warning: comment on exported method ApiController.UpdateProvider should be of the form "UpdateProvider ..." (golint)
    • Line 66: warning: comment on exported method ApiController.AddProvider should be of the form "AddProvider ..." (golint)
    • Line 82: warning: comment on exported method ApiController.DeleteProvider should be of the form "DeleteProvider ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!