Preparing report...

Report for github.com/snowlyg/iris-admin

A    Great!    Found 55 issues across 73 files

Tweet

gofmt95%

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!


gocyclo100%

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.

No problems detected. Good job!


golint26%

Golint is a linter for Go source code.

    • iris-admin/modules/v1/user/model.go
    • Line 7: warning: exported type User should have comment or be unexported (golint)
    • Line 14: warning: exported type BaseUser should have comment or be unexported (golint)
    • Line 21: warning: exported type Avatar should have comment or be unexported (golint)
    • iris-admin/server/zap/index.go
    • Line 15: warning: exported function Init should have comment or be unexported (golint)
    • Line 105: warning: exported type StringsArray should have comment or be unexported (golint)
    • Line 107: warning: exported method StringsArray.MarshalLogArray should have comment or be unexported (golint)
    • iris-admin/modules/v1/file/dao.go
    • Line 17: warning: exported var ErrEmptyErr should have comment or be unexported (golint)
    • Line 20: warning: exported function UploadFile should have comment or be unexported (golint)
    • Line 60: warning: exported function GetFileName should have comment or be unexported (golint)
    • Line 75: warning: exported function GetPath should have comment or be unexported (golint)
    • iris-admin/config/gorm.go
    • Line 5: warning: exported type Mysql should have comment or be unexported (golint)
    • Line 17: warning: exported method Mysql.Dsn should have comment or be unexported (golint)
    • iris-admin/server/module/index.go
    • Line 7: warning: exported type InitDBFunc should have comment or be unexported (golint)
    • Line 11: warning: exported type WebModule should have comment or be unexported (golint)
    • Line 17: warning: exported function NewModule should have comment or be unexported (golint)
    • Line 25: warning: exported method WebModule.GetModules should have comment or be unexported (golint)
    • iris-admin/modules/v1/perm/dao.go
    • Line 14: warning: comment on exported function Paginate should be of the form "Paginate ..." (golint)
    • Line 36: warning: comment on exported function FindByNameAndAct should be of the form "FindByNameAndAct ..." (golint)
    • Line 55: warning: comment on exported function Create should be of the form "Create ..." (golint)
    • Line 69: warning: comment on exported function CreatenInBatches should be of the form "CreatenInBatches ..." (golint)
    • Line 79: warning: comment on exported function Update should be of the form "Update ..." (golint)
    • Line 99: warning: comment on exported function FindById should be of the form "FindById ..." (golint)
    • Line 110: warning: comment on exported function DeleteById should be of the form "DeleteById ..." (golint)
    • Line 120: warning: comment on exported function GetPermsForRole should be of the form "GetPermsForRole ..." (golint)
    • iris-admin/modules/v1/role/dao.go
    • Line 19: warning: exported function GetAdminRoleName should have comment or be unexported (golint)
    • Line 23: warning: comment on exported function Paginate should be of the form "Paginate ..." (golint)
    • Line 45: warning: comment on exported function FindByName should be of the form "FindByName ..." (golint)
    • Line 60: warning: exported function Create should have comment or be unexported (golint)
    • Line 83: warning: exported function Update should have comment or be unexported (golint)
    • Line 108: warning: exported function IsAdminRole should have comment or be unexported (golint)
    • Line 116: warning: exported function FindById should have comment or be unexported (golint)
    • Line 126: warning: exported function DeleteById should have comment or be unexported (golint)
    • Line 140: warning: exported function FindInId should have comment or be unexported (golint)
    • Line 150: warning: comment on exported function AddPermForRole should be of the form "AddPermForRole ..." (golint)
    • Line 178: warning: exported function GetRoleIds should have comment or be unexported (golint)
    • iris-admin/server/web/index.go
    • Line 24: warning: exported type WebServer should have comment or be unexported (golint)
    • Line 37: warning: exported function Init should have comment or be unexported (golint)
    • Line 82: warning: exported method WebServer.GetStaticPath should have comment or be unexported (golint)
    • Line 86: warning: exported method WebServer.GetWebPath should have comment or be unexported (golint)
    • Line 90: warning: exported method WebServer.GetAddr should have comment or be unexported (golint)
    • Line 94: warning: exported method WebServer.AddModule should have comment or be unexported (golint)
    • Line 98: warning: exported method WebServer.AddStatic should have comment or be unexported (golint)
    • Line 102: warning: exported method WebServer.AddWebStatic should have comment or be unexported (golint)
    • Line 110: warning: exported method WebServer.AddUploadStatic should have comment or be unexported (golint)
    • Line 115: warning: exported method WebServer.GetModules should have comment or be unexported (golint)
    • Line 121: warning: exported method WebServer.GetTestAuth should have comment or be unexported (golint)
    • Line 135: warning: exported method WebServer.GetTestLogin should have comment or be unexported (golint)
    • Line 144: warning: exported method WebServer.Run should have comment or be unexported (golint)
    • iris-admin/modules/v1/perm/controller.go
    • Line 13: warning: exported function GetPerm should have comment or be unexported (golint)
    • Line 28: warning: exported function CreatePerm should have comment or be unexported (golint)
    • Line 47: warning: exported function UpdatePerm should have comment or be unexported (golint)
    • Line 73: warning: exported function DeletePerm should have comment or be unexported (golint)
    • Line 89: warning: exported function GetAllPerms should have comment or be unexported (golint)
    • iris-admin/modules/v1/user/dao.go
    • Line 20: warning: exported function Paginate should have comment or be unexported (golint)
    • Line 76: warning: exported function FindByUserName should have comment or be unexported (golint)
    • Line 91: warning: exported function FindPasswordByUserName should have comment or be unexported (golint)
    • Line 105: warning: exported function Create should have comment or be unexported (golint)
    • Line 133: warning: exported function Update should have comment or be unexported (golint)
    • Line 158: warning: exported function IsAdminUser should have comment or be unexported (golint)
    • Line 166: warning: exported function FindById should have comment or be unexported (golint)
    • Line 179: warning: exported function DeleteById should have comment or be unexported (golint)
    • Line 240: warning: exported function UpdateAvatar should have comment or be unexported (golint)
    • iris-admin/middleware/operation.go
    • Line 18: warning: exported function OperationRecord should have comment or be unexported (golint)
    • Line 78: warning: comment on exported function CreateOplog should be of the form "CreateOplog ..." (golint)
    • Line 88: warning: exported type Oplog should have comment or be unexported (golint)
    • iris-admin/modules/v1/role/controller.go
    • Line 13: warning: exported function GetRole should have comment or be unexported (golint)
    • Line 28: warning: exported function CreateRole should have comment or be unexported (golint)
    • Line 47: warning: exported function UpdateRole should have comment or be unexported (golint)
    • Line 73: warning: exported function DeleteRole should have comment or be unexported (golint)
    • Line 89: warning: exported function GetAllRoles should have comment or be unexported (golint)
    • iris-admin/modules/v1/user/response.go
    • Line 10: warning: exported type Response should have comment or be unexported (golint)
    • Line 16: warning: exported method Response.ToString should have comment or be unexported (golint)
    • Line 26: warning: exported type LoginResponse should have comment or be unexported (golint)
    • iris-admin/server/web/router.go
    • Line 17: warning: exported method WebServer.InitRouter should have comment or be unexported (golint)
    • Line 39: warning: exported method WebServer.GetSources should have comment or be unexported (golint)
    • Line 86: warning: comment on exported function DebugParty should be of the form "DebugParty ..." (golint)
    • iris-admin/modules/v1/user/controller.go
    • Line 14: warning: exported function Profile should have comment or be unexported (golint)
    • Line 23: warning: exported function GetUser should have comment or be unexported (golint)
    • Line 38: warning: exported function CreateUser should have comment or be unexported (golint)
    • Line 57: warning: exported function UpdateUser should have comment or be unexported (golint)
    • Line 83: warning: exported function DeleteUser should have comment or be unexported (golint)
    • Line 99: warning: exported function GetAllUsers should have comment or be unexported (golint)
    • Line 118: warning: exported function Logout should have comment or be unexported (golint)
    • Line 132: warning: exported function Clear should have comment or be unexported (golint)
    • Line 145: warning: exported function ChangeAvatar should have comment or be unexported (golint)
    • iris-admin/g/struct.go
    • Line 3: warning: exported type Model should have comment or be unexported (golint)
    • Line 9: warning: exported type ReqId should have comment or be unexported (golint)
    • Line 13: warning: exported type Paginate should have comment or be unexported (golint)
    • Line 20: warning: exported type Response should have comment or be unexported (golint)
    • Line 26: warning: exported type ErrMsg should have comment or be unexported (golint)
    • Line 32: warning: exported var NoErr should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (exit status 2)


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)