Preparing report...

Report for github.com/casbin/casnode

(v0.0.0-20211228131017-9c6df4fd1f76)

A    Great!    Found 76 issues across 95 files

Tweet

gofmt88%

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.

    • object/balance.go
    • Line 89: warning: cyclomatic complexity 19 of function GetMemberConsumptionRecord() is high (> 15) (gocyclo)
    • object/adapter.go
    • Line 114: warning: cyclomatic complexity 17 of function (*Adapter).createTable() is high (> 15) (gocyclo)
    • object/reply.go
    • Line 56: warning: cyclomatic complexity 16 of function GetReplies() is high (> 15) (gocyclo)
    • object/topic.go
    • Line 132: warning: cyclomatic complexity 22 of function GetTopicsAdmin() is high (> 15) (gocyclo)

golint20%

Golint is a linter for Go source code.

    • util/log.go
    • Line 28: warning: exported function GetIPInfo should have comment or be unexported (golint)
    • Line 66: warning: exported function LogInfo should have comment or be unexported (golint)
    • Line 71: warning: exported function LogWarning should have comment or be unexported (golint)
    • Line 76: warning: exported function ReadLog should have comment or be unexported (golint)
    • object/util.go
    • Line 24: warning: exported function GetUserField should have comment or be unexported (golint)
    • Line 28: warning: exported function GetUserFieldInt should have comment or be unexported (golint)
    • Line 37: warning: exported function SetUserField should have comment or be unexported (golint)
    • Line 41: warning: exported function SetUserFieldInt should have comment or be unexported (golint)
    • controllers/base.go
    • Line 24: warning: exported type ApiController should have comment or be unexported (golint)
    • Line 32: warning: exported function GetUserName should have comment or be unexported (golint)
    • Line 40: warning: exported method ApiController.GetSessionClaims should have comment or be unexported (golint)
    • Line 50: warning: exported method ApiController.SetSessionClaims should have comment or be unexported (golint)
    • Line 59: warning: exported method ApiController.GetSessionUser should have comment or be unexported (golint)
    • Line 68: warning: exported method ApiController.SetSessionUser should have comment or be unexported (golint)
    • Line 81: warning: exported method ApiController.GetSessionUsername should have comment or be unexported (golint)
    • controllers/info.go
    • Line 23: warning: comment on exported method ApiController.GetCommunityHealth should be of the form "GetCommunityHealth ..." (golint)
    • Line 58: warning: comment on exported method ApiController.GetForumVersion should be of the form "GetForumVersion ..." (golint)
    • Line 72: warning: comment on exported method ApiController.GetOnlineNum should be of the form "GetOnlineNum ..." (golint)
    • Line 82: warning: comment on exported method ApiController.GetNodeNavigation should be of the form "GetNodeNavigation ..." (golint)
    • object/node.go
    • Line 23: warning: exported type Node should have comment or be unexported (golint)
    • Line 46: warning: exported function GetNodes should have comment or be unexported (golint)
    • Line 56: warning: exported function GetNode should have comment or be unexported (golint)
    • Line 68: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 73: warning: exported function UpdateNode should have comment or be unexported (golint)
    • Line 97: warning: exported function AddNode should have comment or be unexported (golint)
    • Line 106: warning: exported function AddNodes should have comment or be unexported (golint)
    • Line 115: warning: exported function DeleteNode should have comment or be unexported (golint)
    • Line 124: warning: exported function GetNodesNum should have comment or be unexported (golint)
    • Line 134: warning: exported function GetNodeTopicNum should have comment or be unexported (golint)
    • Line 144: warning: exported function GetNodeFromTab should have comment or be unexported (golint)
    • Line 154: warning: exported function GetNodeFromPlane should have comment or be unexported (golint)
    • Line 164: warning: exported function GetNodeRelation should have comment or be unexported (golint)
    • Line 210: warning: exported function GetNodeNavigation should have comment or be unexported (golint)
    • Line 233: warning: exported function GetLatestNode should have comment or be unexported (golint)
    • Line 243: warning: exported function GetHotNode should have comment or be unexported (golint)
    • Line 253: warning: exported function UpdateNodeHotInfo should have comment or be unexported (golint)
    • Line 265: warning: exported function GetNodeModerators should have comment or be unexported (golint)
    • Line 274: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 279: warning: exported function CheckNodeModerator should have comment or be unexported (golint)
    • Line 297: warning: exported function AddNodeModerators should have comment or be unexported (golint)
    • Line 315: warning: exported function DeleteNodeModerators should have comment or be unexported (golint)
    • Line 334: warning: exported method Node.GetAllTopicTitlesOfNode should have comment or be unexported (golint)
    • object/topic.go
    • Line 28: warning: exported type Topic should have comment or be unexported (golint)
    • Line 57: warning: exported function GetTopicCount should have comment or be unexported (golint)
    • Line 66: warning: exported function GetTopicNum should have comment or be unexported (golint)
    • Line 75: warning: exported function GetCreatedTopicsNum should have comment or be unexported (golint)
    • Line 97: warning: exported function GetTopics should have comment or be unexported (golint)
    • Line 111: warning: exported function GetAllTopics should have comment or be unexported (golint)
    • Line 121: warning: exported function GetTopicsByTitleAndAuthor should have comment or be unexported (golint)
    • Line 226: warning: exported function GetTopicWithAvatar should have comment or be unexported (golint)
    • Line 256: warning: exported function GetTopic should have comment or be unexported (golint)
    • Line 265: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 270: warning: exported function GetTopicByUrlPathAndTitle should have comment or be unexported (golint)
    • Line 284: warning: exported function GetTopicBasicInfo should have comment or be unexported (golint)
    • Line 293: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 298: warning: exported function GetTopicAdmin should have comment or be unexported (golint)
    • Line 310: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 315: warning: exported function GetTopicTitle should have comment or be unexported (golint)
    • Line 324: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 329: warning: exported function GetTopicAuthor should have comment or be unexported (golint)
    • Line 343: warning: exported function GetTopicNodeId should have comment or be unexported (golint)
    • Line 352: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 357: warning: exported function GetTopicsByNode should have comment or be unexported (golint)
    • Line 378: warning: exported function GetTopicsByTag should have comment or be unexported (golint)
    • Line 400: warning: exported function UpdateTopic should have comment or be unexported (golint)
    • Line 423: warning: exported function UpdateTopicWithLimitCols should have comment or be unexported (golint)
    • Line 448: warning: exported function AddTopics should have comment or be unexported (golint)
    • Line 457: warning: exported function AddTopicsInBatch should have comment or be unexported (golint)
    • Line 482: warning: exported function DeleteTopicHard should have comment or be unexported (golint)
    • Line 491: warning: exported function DeleteTopic should have comment or be unexported (golint)
    • Line 516: warning: exported function GetAllCreatedTopics should have comment or be unexported (golint)
    • Line 526: warning: exported function AddTopicHitCount should have comment or be unexported (golint)
    • Line 541: warning: exported function ChangeTopicFavoriteCount should have comment or be unexported (golint)
    • Line 556: warning: exported function ChangeTopicReplyCount should have comment or be unexported (golint)
    • Line 571: warning: exported function ChangeTopicLastReplyUser should have comment or be unexported (golint)
    • Line 590: warning: exported function GetTopicsWithTab should have comment or be unexported (golint)
    • Line 594: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 609: warning: exported function UpdateTopicHotInfo should have comment or be unexported (golint)
    • Line 621: warning: exported function GetHotTopic should have comment or be unexported (golint)
    • Line 681: warning: exported function GetTopicEditableStatus should have comment or be unexported (golint)
    • Line 764: warning: exported method Topic.GetAllRepliesOfTopic should have comment or be unexported (golint)
    • Line 783: warning: exported function SearchTopics should have comment or be unexported (golint)
    • object/translator.go
    • Line 11: warning: exported type Translator should have comment or be unexported (golint)
    • Line 20: warning: exported type TranslateData should have comment or be unexported (golint)
    • Line 26: warning: exported type GoogleTranslationResult should have comment or be unexported (golint)
    • Line 44: warning: exported function StrTranslate should have comment or be unexported (golint)
    • Line 116: warning: exported function AddTranslator should have comment or be unexported (golint)
    • Line 125: warning: exported function GetTranslator should have comment or be unexported (golint)
    • Line 141: warning: exported function GetEnableTranslator should have comment or be unexported (golint)
    • Line 153: warning: exported function UpdateTranslator should have comment or be unexported (golint)
    • Line 167: warning: exported function DelTranslator should have comment or be unexported (golint)
    • object/cron.go
    • Line 13: warning: exported type CronJob should have comment or be unexported (golint)
    • Line 19: warning: exported type UpdateJob should have comment or be unexported (golint)
    • Line 71: warning: exported function GetUpdateJob should have comment or be unexported (golint)
    • Line 81: warning: exported function GetJobs should have comment or be unexported (golint)
    • Line 85: warning: exported function GetUpdateJobs should have comment or be unexported (golint)
    • util/json.go
    • Line 19: warning: exported function StructToJson should have comment or be unexported (golint)
    • Line 28: warning: exported function StructToJsonFormatted should have comment or be unexported (golint)
    • Line 37: warning: exported function JsonToStruct should have comment or be unexported (golint)
    • util/path.go
    • Line 22: warning: exported function FileExist should have comment or be unexported (golint)
    • Line 29: warning: exported function ListFiles should have comment or be unexported (golint)
    • controllers/hot.go
    • Line 22: warning: comment on exported method ApiController.ChangeExpiredDataStatus should be of the form "ChangeExpiredDataStatus ..." (golint)
    • Line 36: warning: comment on exported method ApiController.UpdateHotInfo should be of the form "UpdateHotInfo ..." (golint)
    • controllers/notifications.go
    • Line 24: warning: exported method ApiController.AddNotification should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method ApiController.GetNotifications should be of the form "GetNotifications ..." (golint)
    • Line 83: warning: comment on exported method ApiController.DeleteNotification should be of the form "DeleteNotification ..." (golint)
    • Line 93: warning: comment on exported method ApiController.GetUnreadNotificationNum should be of the form "GetUnreadNotificationNum ..." (golint)
    • Line 103: warning: comment on exported method ApiController.UpdateReadStatus should be of the form "UpdateReadStatus ..." (golint)
    • controllers/sensitive.go
    • Line 21: warning: comment on exported method ApiController.AddSensitive should be of the form "AddSensitive ..." (golint)
    • Line 48: warning: comment on exported method ApiController.DelSensitive should be of the form "DelSensitive ..." (golint)
    • Line 71: warning: comment on exported method ApiController.GetSensitive should be of the form "GetSensitive ..." (golint)
    • object/adapter.go
    • Line 22: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 27: warning: exported var CasdoorOrganization should have comment or be unexported (golint)
    • Line 28: warning: exported var CasdoorApplication should have comment or be unexported (golint)
    • Line 30: warning: exported type Session should have comment or be unexported (golint)
    • Line 36: warning: exported function InitConfig should have comment or be unexported (golint)
    • Line 43: warning: exported function InitAdapter should have comment or be unexported (golint)
    • object/conf.go
    • Line 20: warning: exported var DefaultPageNum should have comment or be unexported (golint)
    • object/file.go
    • Line 19: warning: exported type UploadFileRecord should have comment or be unexported (golint)
    • Line 34: warning: exported function AddFileRecord should have comment or be unexported (golint)
    • Line 43: warning: exported function GetFile should have comment or be unexported (golint)
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 57: warning: exported function GetFiles should have comment or be unexported (golint)
    • Line 77: warning: exported function DeleteFilesByMember should have comment or be unexported (golint)
    • Line 86: warning: exported function GetFilesNum should have comment or be unexported (golint)
    • Line 99: warning: exported function DeleteFileRecord should have comment or be unexported (golint)
    • Line 110: warning: exported function FileEditable should have comment or be unexported (golint)
    • Line 122: warning: exported function AddFileViewsNum should have comment or be unexported (golint)
    • Line 137: warning: exported function UpdateFileDescribe should have comment or be unexported (golint)
    • object/frontConf.go
    • Line 17: warning: exported type FrontConf should have comment or be unexported (golint)
    • Line 24: warning: exported var Confs should have comment or be unexported (golint)
    • Line 36: warning: exported function InitFrontConf should have comment or be unexported (golint)
    • Line 50: warning: exported function GetFrontConfByField should have comment or be unexported (golint)
    • Line 60: warning: exported function GetFrontConfs should have comment or be unexported (golint)
    • Line 70: warning: exported function UpdateFrontConf should have comment or be unexported (golint)
    • object/reply.go
    • Line 25: warning: exported type Reply should have comment or be unexported (golint)
    • Line 52: warning: comment on exported function GetReplies should be of the form "GetReplies ..." (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 183: warning: exported function GetRepliesOfTopic should have comment or be unexported (golint)
    • Line 312: warning: exported function AddReplies should have comment or be unexported (golint)
    • Line 321: warning: exported function AddRepliesInBatch should have comment or be unexported (golint)
    • Line 357: warning: exported function DeleteRepliesHardByTopicId should have comment or be unexported (golint)
    • Line 494: warning: exported function SearchReplies should have comment or be unexported (golint)
    • casdoor/user_adapter.go
    • Line 87: warning: exported function GetUser should have comment or be unexported (golint)
    • Line 106: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 130: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 135: warning: exported function AddUser should have comment or be unexported (golint)
    • Line 148: warning: exported function AddUsers should have comment or be unexported (golint)
    • Line 165: warning: exported function AddUsersInBatch should have comment or be unexported (golint)
    • Line 199: warning: exported function UpdateUser should have comment or be unexported (golint)
    • controllers/translator.go
    • Line 9: warning: comment on exported method ApiController.UpdateTranslator should be of the form "UpdateTranslator ..." (golint)
    • Line 27: warning: comment on exported method ApiController.AddTranslator should be of the form "AddTranslator ..." (golint)
    • Line 53: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 61: warning: comment on exported method ApiController.GetTranslator should be of the form "GetTranslator ..." (golint)
    • Line 72: warning: exported method ApiController.GetEnableTranslator should have comment or be unexported (golint)
    • Line 79: warning: comment on exported method ApiController.VisibleTranslator should be of the form "VisibleTranslator ..." (golint)
    • Line 93: warning: comment on exported method ApiController.DelTranslator should be of the form "DelTranslator ..." (golint)
    • discuzx/thread.go
    • Line 23: warning: exported type Thread should have comment or be unexported (golint)
    • Line 62: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • discuzx/member_ucenter.go
    • Line 17: warning: exported type UcenterMember should have comment or be unexported (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • discuzx/topic.go
    • Line 24: warning: exported var MaxTopTime should have comment or be unexported (golint)
    • Line 167: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • util/string.go
    • Line 25: warning: exported function ParseInt should have comment or be unexported (golint)
    • Line 34: warning: exported function IntToString should have comment or be unexported (golint)
    • Line 38: warning: exported function ReadStringFromPath should have comment or be unexported (golint)
    • Line 47: warning: exported function WriteStringToPath should have comment or be unexported (golint)
    • Line 54: warning: exported var Segmenter should have comment or be unexported (golint)
    • Line 56: warning: exported function InitSegmenter should have comment or be unexported (golint)
    • Line 71: warning: exported function ConvertToPinyin should have comment or be unexported (golint)
    • controllers/balance.go
    • Line 27: warning: comment on exported method ApiController.AddThanks should be of the form "AddThanks ..." (golint)
    • Line 108: warning: comment on exported method ApiController.GetConsumptionRecord should be of the form "GetConsumptionRecord ..." (golint)
    • Line 134: warning: comment on exported method ApiController.GetCheckinBonus should be of the form "GetCheckinBonus ..." (golint)
    • Line 182: warning: comment on exported method ApiController.GetCheckinBonusStatus should be of the form "GetCheckinBonusStatus ..." (golint)
    • controllers/file.go
    • Line 30: warning: exported type NewUploadFile should have comment or be unexported (golint)
    • Line 37: warning: exported method ApiController.GetFiles should have comment or be unexported (golint)
    • Line 64: warning: exported method ApiController.GetFileNum should have comment or be unexported (golint)
    • Line 78: warning: exported method ApiController.AddFileRecord should have comment or be unexported (golint)
    • Line 124: warning: exported method ApiController.DeleteFile should have comment or be unexported (golint)
    • Line 150: warning: exported method ApiController.GetFile should have comment or be unexported (golint)
    • Line 167: warning: exported method ApiController.UpdateFileDescribe should have comment or be unexported (golint)
    • Line 185: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 194: warning: comment on exported method ApiController.UploadFile should be of the form "UploadFile ..." (golint)
    • Line 216: warning: comment on exported method ApiController.ModeratorUpload should be of the form "ModeratorUpload ..." (golint)
    • Line 243: warning: comment on exported method ApiController.UploadAvatar should be of the form "UploadAvatar ..." (golint)
    • object/sensitive_word.go
    • Line 19: warning: exported type SensitiveWord should have comment or be unexported (golint)
    • Line 35: warning: exported function AddSensitiveWord should have comment or be unexported (golint)
    • Line 50: warning: exported function DeleteSensitiveWord should have comment or be unexported (golint)
    • Line 62: warning: exported function IsSensitiveWord should have comment or be unexported (golint)
    • Line 72: warning: exported function GetSensitiveWords should have comment or be unexported (golint)
    • Line 81: warning: exported function ContainsSensitiveWord should have comment or be unexported (golint)
    • object/tab.go
    • Line 17: warning: exported type Tab should have comment or be unexported (golint)
    • Line 30: warning: exported function GetTab 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 AddTab should have comment or be unexported (golint)
    • Line 53: warning: exported function AddTabs should have comment or be unexported (golint)
    • Line 62: warning: exported function UpdateTab should have comment or be unexported (golint)
    • Line 76: warning: exported function DeleteTab should have comment or be unexported (golint)
    • Line 85: warning: exported function GetHomePageTabs should have comment or be unexported (golint)
    • Line 95: warning: exported function GetAllTabs should have comment or be unexported (golint)
    • Line 130: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 135: warning: exported function GetAllTabsAdmin should have comment or be unexported (golint)
    • Line 165: warning: exported function GetDefaultTab should have comment or be unexported (golint)
    • Line 175: warning: exported function GetNodesByTab should have comment or be unexported (golint)
    • controllers/tab.go
    • Line 24: warning: comment on exported method ApiController.GetTabs should be of the form "GetTabs ..." (golint)
    • Line 32: warning: comment on exported method ApiController.GetAllTabs should be of the form "GetAllTabs ..." (golint)
    • Line 40: warning: comment on exported method ApiController.GetAllTabsAdmin should be of the form "GetAllTabsAdmin ..." (golint)
    • Line 48: warning: comment on exported method ApiController.GetTabAdmin should be of the form "GetTabAdmin ..." (golint)
    • Line 58: warning: comment on exported method ApiController.AddTab should be of the form "AddTab ..." (golint)
    • Line 100: warning: comment on exported method ApiController.UpdateTab should be of the form "UpdateTab ..." (golint)
    • Line 129: warning: comment on exported method ApiController.DeleteTab should be of the form "DeleteTab ..." (golint)
    • Line 144: warning: comment on exported method ApiController.GetTabWithNodes should be of the form "GetTabWithNodes ..." (golint)
    • Line 162: warning: exported method ApiController.GetTabNodes should have comment or be unexported (golint)
    • object/notification.go
    • Line 25: warning: comment on exported type Notification should be of the form "Notification ..." (with optional leading article) (golint)
    • Line 38: warning: exported function AddNotification should have comment or be unexported (golint)
    • Line 47: warning: exported function DeleteNotification should have comment or be unexported (golint)
    • Line 58: warning: exported function GetNotificationCount should have comment or be unexported (golint)
    • Line 67: warning: exported function GetNotifications should have comment or be unexported (golint)
    • Line 123: warning: exported function GetNotificationNum should have comment or be unexported (golint)
    • Line 136: warning: exported function GetUnreadNotificationNum should have comment or be unexported (golint)
    • Line 159: warning: exported function UpdateReadStatus should have comment or be unexported (golint)
    • Line 170: warning: exported function AddReplyNotification should have comment or be unexported (golint)
    • Line 220: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 248: warning: exported function AddTopicNotification should have comment or be unexported (golint)
    • Line 269: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • discuzx/member_profile.go
    • Line 17: warning: exported type Profile should have comment or be unexported (golint)
    • Line 59: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • routers/filter_ssr.go
    • Line 57: warning: exported function InitChromeDp should have comment or be unexported (golint)
    • Line 65: warning: exported function RenderPage should have comment or be unexported (golint)
    • Line 94: warning: exported function BotFilter should have comment or be unexported (golint)
    • controllers/node.go
    • Line 24: warning: comment on exported method ApiController.GetNodes should be of the form "GetNodes ..." (golint)
    • Line 32: warning: comment on exported method ApiController.GetNodesAdmin should be of the form "GetNodesAdmin ..." (golint)
    • Line 51: warning: comment on exported method ApiController.GetNode should be of the form "GetNode ..." (golint)
    • Line 62: warning: comment on exported method ApiController.UpdateNode should be of the form "UpdateNode ..." (golint)
    • Line 81: warning: comment on exported method ApiController.AddNode should be of the form "AddNode ..." (golint)
    • Line 116: warning: comment on exported method ApiController.DeleteNode should be of the form "DeleteNode ..." (golint)
    • Line 130: warning: comment on exported method ApiController.GetNodesNum should be of the form "GetNodesNum ..." (golint)
    • Line 138: warning: comment on exported method ApiController.GetNodeInfo should be of the form "GetNodeInfo ..." (golint)
    • Line 149: warning: exported method ApiController.GetNodeFromTab should have comment or be unexported (golint)
    • Line 156: warning: comment on exported method ApiController.GetNodeRelation should be of the form "GetNodeRelation ..." (golint)
    • Line 166: warning: comment on exported method ApiController.GetLatestNode should be of the form "GetLatestNode ..." (golint)
    • Line 184: warning: comment on exported method ApiController.GetHotNode should be of the form "GetHotNode ..." (golint)
    • Line 202: warning: comment on exported method ApiController.AddNodeBrowseCount should be of the form "AddNodeBrowseCount ..." (golint)
    • Line 227: warning: comment on exported method ApiController.AddNodeModerators should be of the form "AddNodeModerators ..." (golint)
    • Line 255: warning: comment on exported method ApiController.DeleteNodeModerators should be of the form "DeleteNodeModerators ..." (golint)
    • object/check.go
    • Line 22: warning: exported function HasNode should have comment or be unexported (golint)
    • Line 28: warning: exported function HasTab should have comment or be unexported (golint)
    • Line 34: warning: exported function HasPlane should have comment or be unexported (golint)
    • Line 45: warning: exported function FilterUnsafeHTML should have comment or be unexported (golint)
    • discuzx/attachment.go
    • Line 25: warning: exported type Attachment should have comment or be unexported (golint)
    • Line 86: 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)
    • casdoor/adapter.go
    • Line 21: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 26: warning: exported var CasdoorOrganization should have comment or be unexported (golint)
    • Line 28: warning: exported type Session should have comment or be unexported (golint)
    • Line 34: warning: exported function InitCasdoorAdapter should have comment or be unexported (golint)
    • controllers/util.go
    • Line 17: warning: exported type Response should have comment or be unexported (golint)
    • Line 24: warning: exported method ApiController.ResponseOk should have comment or be unexported (golint)
    • Line 37: warning: exported method ApiController.ResponseError should have comment or be unexported (golint)
    • Line 50: warning: exported method ApiController.RequireSignedIn should have comment or be unexported (golint)
    • Line 59: warning: exported method ApiController.RequireAdmin should have comment or be unexported (golint)
    • object/mailing_list.go
    • Line 14: warning: exported method Node.AddTopicToMailingList should have comment or be unexported (golint)
    • Line 22: warning: exported method Node.SyncFromGoogleGroup should have comment or be unexported (golint)
    • Line 129: warning: exported function AutoSyncGoogleGroup should have comment or be unexported (golint)
    • Line 139: warning: exported function SyncAllNodeFromGoogleGroup should have comment or be unexported (golint)
    • Line 154: warning: exported method Reply.AddReplyToMailingList should have comment or be unexported (golint)
    • casdoor/user.go
    • Line 19: warning: exported function GetUsers should have comment or be unexported (golint)
    • Line 22: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 32: warning: exported function GetSortedUsers should have comment or be unexported (golint)
    • Line 35: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 45: warning: exported function GetUserCount should have comment or be unexported (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 58: warning: exported function GetOnlineUserCount should have comment or be unexported (golint)
    • Line 61: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 71: warning: exported function GetUserByEmail should have comment or be unexported (golint)
    • Line 74: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • controllers/topic.go
    • Line 30: warning: exported type NewTopicForm should have comment or be unexported (golint)
    • Line 38: warning: comment on exported method ApiController.GetTopics should be of the form "GetTopics ..." (golint)
    • Line 65: warning: comment on exported method ApiController.GetTopicsAdmin should be of the form "GetTopicsAdmin ..." (golint)
    • Line 118: warning: comment on exported method ApiController.GetTopic should be of the form "GetTopic ..." (golint)
    • Line 144: warning: comment on exported method ApiController.GetTopicAdmin should be of the form "GetTopicAdmin ..." (golint)
    • Line 159: warning: exported method ApiController.UpdateTopic should have comment or be unexported (golint)
    • Line 173: warning: comment on exported method ApiController.AddTopic should be of the form "AddTopic ..." (golint)
    • Line 269: warning: comment on exported method ApiController.UploadTopicPic should be of the form "UploadTopicPic ..." (golint)
    • Line 298: warning: comment on exported method ApiController.DeleteTopic should be of the form "DeleteTopic ..." (golint)
    • Line 321: warning: comment on exported method ApiController.GetTopicsNum should be of the form "GetTopicsNum ..." (golint)
    • Line 331: warning: comment on exported method ApiController.GetAllCreatedTopics should be of the form "GetAllCreatedTopics ..." (golint)
    • Line 369: warning: comment on exported method ApiController.GetCreatedTopicsNum should be of the form "GetCreatedTopicsNum ..." (golint)
    • Line 382: warning: comment on exported method ApiController.GetTopicsByNode should be of the form "GetTopicsByNode ..." (golint)
    • Line 411: warning: comment on exported method ApiController.GetTopicsByTag should be of the form "GetTopicsByTag ..." (golint)
    • Line 440: warning: comment on exported method ApiController.AddTopicHitCount should be of the form "AddTopicHitCount ..." (golint)
    • Line 471: warning: comment on exported method ApiController.GetTopicsByTab should be of the form "GetTopicsByTab ..." (golint)
    • Line 500: warning: comment on exported method ApiController.AddTopicBrowseCount should be of the form "AddTopicBrowseCount ..." (golint)
    • Line 528: warning: comment on exported method ApiController.GetHotTopic should be of the form "GetHotTopic ..." (golint)
    • Line 550: warning: comment on exported method ApiController.GetSortedTopics should be of the form "GetSortedTopics ..." (golint)
    • Line 587: warning: comment on exported method ApiController.UpdateTopicNode should be of the form "UpdateTopicNode ..." (golint)
    • Line 630: warning: comment on exported method ApiController.EditContent should be of the form "EditContent ..." (golint)
    • Line 697: warning: comment on exported method ApiController.TranslateTopic should be of the form "TranslateTopic ..." (golint)
    • Line 771: warning: comment on exported method ApiController.CancelTopTopic should be of the form "CancelTopTopic ..." (golint)
    • Line 805: warning: comment on exported method ApiController.GetTopicByUrlPathAndTitle should be of the form "GetTopicByUrlPathAndTitle ..." (golint)
    • object/plane.go
    • Line 19: warning: exported type Plane should have comment or be unexported (golint)
    • Line 30: warning: exported function GetPlanes should have comment or be unexported (golint)
    • Line 40: warning: exported function GetAllPlanes should have comment or be unexported (golint)
    • Line 60: warning: exported function GetPlane should have comment or be unexported (golint)
    • Line 69: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 74: warning: exported function GetPlaneAdmin should have comment or be unexported (golint)
    • Line 92: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 97: warning: exported function AddPlane should have comment or be unexported (golint)
    • Line 106: warning: exported function UpdatePlane should have comment or be unexported (golint)
    • Line 119: warning: exported function GetPlaneList should have comment or be unexported (golint)
    • Line 142: warning: exported function DeletePlane should have comment or be unexported (golint)
    • Line 151: warning: exported function GetPlaneNodesNum should have comment or be unexported (golint)
    • object/poster.go
    • Line 17: warning: exported type Poster should have comment or be unexported (golint)
    • Line 25: warning: exported function AddPoster should have comment or be unexported (golint)
    • Line 34: warning: exported function GetPoster should have comment or be unexported (golint)
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 48: warning: exported function UpdatePoster should have comment or be unexported (golint)
    • object/basic.go
    • Line 28: warning: exported type BasicInfo should have comment or be unexported (golint)
    • Line 36: warning: exported function InitForumBasicInfo should have comment or be unexported (golint)
    • Line 48: warning: exported function GetForumVersion should have comment or be unexported (golint)
    • Line 56: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 75: warning: exported function GetHighestOnlineNum should have comment or be unexported (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 104: warning: exported function UpdateHighestOnlineNum should have comment or be unexported (golint)
    • Line 116: warning: exported function GetCronJobs should have comment or be unexported (golint)
    • Line 130: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 149: warning: exported function GetCronUpdateJobs should have comment or be unexported (golint)
    • Line 163: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 182: warning: exported function GetLatestSyncedRecordId should have comment or be unexported (golint)
    • Line 191: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 206: warning: exported function UpdateLatestSyncedRecordId should have comment or be unexported (golint)
    • Line 239: warning: exported function RemoveHtmlTags should have comment or be unexported (golint)
    • object/hot.go
    • Line 17: warning: comment on exported type BrowseRecord should be of the form "BrowseRecord ..." (with optional leading article) (golint)
    • Line 27: warning: exported function GetBrowseRecordNum should have comment or be unexported (golint)
    • Line 37: warning: exported function DeletedExpiredData should have comment or be unexported (golint)
    • Line 46: warning: exported function AddBrowseRecordNum should have comment or be unexported (golint)
    • Line 55: warning: exported function ChangeExpiredDataStatus should have comment or be unexported (golint)
    • Line 68: warning: exported function GetLastRecordId should have comment or be unexported (golint)
    • Line 80: warning: exported function UpdateHotNode should have comment or be unexported (golint)
    • Line 95: warning: exported function UpdateHotTopic should have comment or be unexported (golint)
    • object/member.go
    • Line 27: warning: exported function GetRankingRich should have comment or be unexported (golint)
    • Line 31: warning: exported function GetUser should have comment or be unexported (golint)
    • Line 36: warning: exported function GetUsers should have comment or be unexported (golint)
    • Line 41: warning: exported function GetMemberNum should have comment or be unexported (golint)
    • Line 45: warning: exported function UpdateMemberEditorType should have comment or be unexported (golint)
    • Line 54: warning: exported function GetMemberEditorType should have comment or be unexported (golint)
    • Line 58: warning: exported function UpdateMemberLanguage should have comment or be unexported (golint)
    • Line 63: warning: exported function GetMemberLanguage should have comment or be unexported (golint)
    • Line 77: warning: exported function GetUserByEmail should have comment or be unexported (golint)
    • Line 81: warning: exported function GetMemberCheckinDate should have comment or be unexported (golint)
    • Line 85: warning: exported function UpdateMemberCheckinDate should have comment or be unexported (golint)
    • Line 90: warning: exported function GetUserName should have comment or be unexported (golint)
    • Line 98: warning: exported function CheckIsAdmin should have comment or be unexported (golint)
    • Line 106: warning: exported function GetMemberFileQuota should have comment or be unexported (golint)
    • Line 125: warning: exported function GetOnlineUserCount should have comment or be unexported (golint)
    • Line 129: warning: exported type UpdateListItem should have comment or be unexported (golint)
    • Line 134: warning: exported function AddMemberByNameAndEmailIfNotExist should have comment or be unexported (golint)
    • util/file.go
    • Line 24: warning: exported function FileExt should have comment or be unexported (golint)
    • util/time.go
    • Line 29: warning: exported function GetTimeFromTimestamp should have comment or be unexported (golint)
    • controllers/favorites.go
    • Line 24: warning: comment on exported method ApiController.AddFavorites should be of the form "AddFavorites ..." (golint)
    • Line 85: warning: comment on exported method ApiController.DeleteFavorites should be of the form "DeleteFavorites ..." (golint)
    • Line 123: warning: comment on exported method ApiController.GetFavoritesStatus should be of the form "GetFavoritesStatus ..." (golint)
    • Line 144: warning: comment on exported method ApiController.GetFavorites should be of the form "GetFavorites ..." (golint)
    • Line 191: warning: comment on exported method ApiController.GetAccountFavoriteNum should be of the form "GetAccountFavoriteNum ..." (golint)
    • controllers/reply.go
    • Line 25: warning: exported type NewReplyForm should have comment or be unexported (golint)
    • Line 30: warning: comment on exported method ApiController.GetReplies should be of the form "GetReplies ..." (golint)
    • Line 70: warning: comment on exported method ApiController.GetAllRepliesOfTopic should be of the form "GetAllRepliesOfTopic ..." (golint)
    • Line 80: warning: comment on exported method ApiController.GetReply should be of the form "GetReply ..." (golint)
    • Line 92: warning: comment on exported method ApiController.GetReplyWithDetails should be of the form "GetReplyWithDetails ..." (golint)
    • Line 106: warning: comment on exported method ApiController.UpdateReply should be of the form "UpdateReply ..." (golint)
    • Line 123: warning: comment on exported method ApiController.AddReply should be of the form "AddReply ..." (golint)
    • Line 176: warning: comment on exported method ApiController.DeleteReply should be of the form "DeleteReply ..." (golint)
    • Line 207: warning: comment on exported method ApiController.GetLatestReplies should be of the form "GetLatestReplies ..." (golint)
    • Line 238: warning: comment on exported method ApiController.GetMemberRepliesNum should be of the form "GetMemberRepliesNum ..." (golint)
    • object/balance.go
    • Line 24: warning: comment on exported type ConsumptionRecord should be of the form "ConsumptionRecord ..." (with optional leading article) (golint)
    • Line 38: warning: exported function GetBalances should have comment or be unexported (golint)
    • Line 48: warning: exported function GetMemberBalances should have comment or be unexported (golint)
    • Line 58: warning: exported function AddBalance should have comment or be unexported (golint)
    • Line 67: warning: exported function GetMemberBalance should have comment or be unexported (golint)
    • Line 71: warning: exported function UpdateMemberBalance should have comment or be unexported (golint)
    • Line 76: warning: exported function GetMemberConsumptionRecordNum should have comment or be unexported (golint)
    • Line 89: warning: exported function GetMemberConsumptionRecord should have comment or be unexported (golint)
    • Line 162: warning: exported function GetThanksStatus should have comment or be unexported (golint)
    • Line 172: warning: exported function CreateTopicConsumption should have comment or be unexported (golint)
    • Line 194: warning: exported function CreateReplyConsumption should have comment or be unexported (golint)
    • Line 216: warning: exported function GetReplyBonus should have comment or be unexported (golint)
    • Line 236: warning: exported function TopTopicConsumption should have comment or be unexported (golint)
    • object/type.go
    • Line 19: warning: exported type LatestReply should have comment or be unexported (golint)
    • Line 30: warning: exported type TopicWithAvatar should have comment or be unexported (golint)
    • Line 38: warning: exported type NodeTopic should have comment or be unexported (golint)
    • Line 47: warning: exported type ReplyWithAvatar should have comment or be unexported (golint)
    • Line 57: warning: exported type NodeFavoritesRes should have comment or be unexported (golint)
    • Line 62: warning: exported type CommunityHealth should have comment or be unexported (golint)
    • Line 68: warning: exported type NodeRelation should have comment or be unexported (golint)
    • Line 74: warning: exported type NotificationResponse should have comment or be unexported (golint)
    • Line 81: warning: exported type NodeNavigationResponse should have comment or be unexported (golint)
    • Line 86: warning: exported type PlaneWithNodes should have comment or be unexported (golint)
    • Line 91: warning: exported type BalanceResponse should have comment or be unexported (golint)
    • Line 103: warning: exported type AdminTabInfo should have comment or be unexported (golint)
    • Line 114: warning: exported type AdminMemberInfo should have comment or be unexported (golint)
    • Line 125: warning: exported type AdminPlaneInfo should have comment or be unexported (golint)
    • Line 133: warning: exported type AdminTopicInfo should have comment or be unexported (golint)
    • discuzx/casdoor_init.go
    • Line 22: warning: exported var CasdoorOrganization should have comment or be unexported (golint)
    • Line 23: warning: exported var CasdoorApplication should have comment or be unexported (golint)
    • controllers/frontConf.go
    • Line 23: warning: comment on exported method ApiController.GetFrontConfByField should be of the form "GetFrontConfByField ..." (golint)
    • Line 35: warning: comment on exported method ApiController.GetFrontConfs should be of the form "GetFrontConfs ..." (golint)
    • Line 52: warning: comment on exported method ApiController.UpdateFrontConf should be of the form "UpdateFrontConf ..." (golint)
    • Line 71: warning: comment on exported method ApiController.UpdateFrontConfToDefault should be of the form "UpdateFrontConfToDefault ..." (golint)
    • controllers/poster.go
    • Line 23: warning: comment on exported method ApiController.UpdatePoster should be of the form "UpdatePoster ..." (golint)
    • Line 44: warning: comment on exported method ApiController.ReadPoster should be of the form "ReadPoster ..." (golint)
    • object/favorites.go
    • Line 28: warning: exported function AddFavorites should have comment or be unexported (golint)
    • Line 37: warning: exported function DeleteFavorites should have comment or be unexported (golint)
    • Line 46: warning: exported function GetFavoritesCount should have comment or be unexported (golint)
    • Line 55: warning: exported function GetFavoritesStatus should have comment or be unexported (golint)
    • Line 65: warning: exported function GetTopicsFromFavorites should have comment or be unexported (golint)
    • Line 82: warning: exported function GetFollowingNewAction should have comment or be unexported (golint)
    • Line 103: warning: exported function GetNodesFromFavorites should have comment or be unexported (golint)
    • Line 121: warning: exported function GetNodeFavoritesNum should have comment or be unexported (golint)
    • Line 131: warning: exported function GetFollowingNum should have comment or be unexported (golint)
    • Line 141: warning: exported function GetFavoritesNum should have comment or be unexported (golint)
    • discuzx/forum_field.go
    • Line 17: warning: exported type Field should have comment or be unexported (golint)
    • Line 44: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • discuzx/member.go
    • Line 17: warning: exported type Member should have comment or be unexported (golint)
    • Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • service/oss.go
    • Line 29: warning: exported function UploadFileToStorageSafe should have comment or be unexported (golint)
    • service/tokenizer.go
    • Line 31: warning: exported function InitDictionary should have comment or be unexported (golint)
    • Line 35: warning: exported function Finalword should have comment or be unexported (golint)
    • Line 39: warning: exported function Tokenizer should have comment or be unexported (golint)
    • Line 45: warning: exported function Keyword should have comment or be unexported (golint)
    • Line 60: warning: should omit 2nd value from range; this loop is equivalent to `for s := range ...` (golint)
    • Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • object/proxy.go
    • Line 29: warning: exported function InitHttpClient should have comment or be unexported (golint)
    • discuzx/class.go
    • Line 17: warning: exported type Class should have comment or be unexported (golint)
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • controllers/member.go
    • Line 23: warning: comment on exported method ApiController.GetMember should be of the form "GetMember ..." (golint)
    • Line 35: warning: comment on exported method ApiController.GetMemberEditorType should be of the form "GetMemberEditorType ..." (golint)
    • Line 51: warning: comment on exported method ApiController.GetRankingRich should be of the form "GetRankingRich ..." (golint)
    • Line 66: warning: comment on exported method ApiController.UpdateMemberEditorType should be of the form "UpdateMemberEditorType ..." (golint)
    • Line 87: warning: comment on exported method ApiController.UpdateMemberLanguage should be of the form "UpdateMemberLanguage ..." (golint)
    • Line 116: warning: comment on exported method ApiController.GetMemberLanguage should be of the form "GetMemberLanguage ..." (golint)
    • controllers/plane.go
    • Line 24: warning: exported method ApiController.GetPlanes should have comment or be unexported (golint)
    • Line 29: warning: comment on exported method ApiController.GetPlanesAdmin should be of the form "GetPlanesAdmin ..." (golint)
    • Line 37: warning: comment on exported method ApiController.GetPlane should be of the form "GetPlane ..." (golint)
    • Line 47: warning: comment on exported method ApiController.GetPlaneAdmin should be of the form "GetPlaneAdmin ..." (golint)
    • Line 57: warning: comment on exported method ApiController.GetPlaneList should be of the form "GetPlaneList ..." (golint)
    • Line 64: warning: comment on exported method ApiController.AddPlane should be of the form "AddPlane ..." (golint)
    • Line 108: warning: comment on exported method ApiController.UpdatePlane should be of the form "UpdatePlane ..." (golint)
    • Line 138: warning: comment on exported method ApiController.DeletePlane should be of the form "DeletePlane ..." (golint)
    • object/avatar.go
    • Line 23: warning: exported var CasdoorStorageEndpoint should have comment or be unexported (golint)
    • discuzx/adapter.go
    • Line 21: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 27: warning: exported function InitAdapter should have comment or be unexported (golint)
    • controllers/account.go
    • Line 18: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 26: warning: comment on exported var JwtPublicKey should be of the form "JwtPublicKey ..." (golint)
    • Line 33: warning: exported function InitAuthConfig should have comment or be unexported (golint)
    • Line 43: warning: comment on exported method ApiController.Signin should be of the form "Signin ..." (golint)
    • Line 78: warning: comment on exported method ApiController.Signout should be of the form "Signout ..." (golint)
    • Line 98: warning: comment on exported method ApiController.GetAccount should be of the form "GetAccount ..." (golint)
    • Line 113: warning: exported method ApiController.UpdateAccountBalance should have comment or be unexported (golint)
    • discuzx/forum.go
    • Line 19: warning: exported type Forum should have comment or be unexported (golint)
    • Line 51: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!