Preparing report...

Report for github.com/eduoj/backend

A+    Excellent!    Found 89 issues across 149 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


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.

    • backend/app/controller/problem_set.go
    • Line 396: warning: cyclomatic complexity 16 of function GetProblemSetProblemOutputFile() is high (> 15) (gocyclo)
    • Line 328: warning: cyclomatic complexity 16 of function GetProblemSetProblemInputFile() is high (> 15) (gocyclo)
    • backend/app/controller/submission.go
    • Line 116: warning: cyclomatic complexity 20 of function GetSubmission() is high (> 15) (gocyclo)
    • Line 446: warning: cyclomatic complexity 20 of function GetRunComparerOutput() is high (> 15) (gocyclo)
    • Line 315: warning: cyclomatic complexity 20 of function GetRunOutput() is high (> 15) (gocyclo)
    • Line 382: warning: cyclomatic complexity 17 of function GetRunInput() is high (> 15) (gocyclo)
    • Line 268: warning: cyclomatic complexity 16 of function GetRunCompilerOutput() is high (> 15) (gocyclo)

golint40%

Golint is a linter for Go source code.

    • backend/app/controller/judger.go
    • Line 40: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 91: warning: exported function GetTask should have comment or be unexported (golint)
    • Line 158: warning: exported function UpdateRun should have comment or be unexported (golint)
    • backend/base/exit/exit.go
    • Line 8: warning: exported var Close should have its own declaration (golint)
    • Line 9: warning: exported var QuitWG should have comment or be unexported (golint)
    • backend/app/response/basic.go
    • Line 8: warning: exported type ValidationError should have comment or be unexported (golint)
    • Line 14: warning: exported type Response should have comment or be unexported (golint)
    • Line 20: warning: exported function InternalErrorResp should have comment or be unexported (golint)
    • Line 24: warning: exported function MakeInternalErrorResp should have comment or be unexported (golint)
    • Line 32: warning: exported function ErrorResp should have comment or be unexported (golint)
    • backend/app/response/class.go
    • Line 5: warning: exported type CreateClassResponse should have comment or be unexported (golint)
    • Line 13: warning: exported type GetClassResponse should have comment or be unexported (golint)
    • Line 21: warning: exported type GetClassResponseForAdmin should have comment or be unexported (golint)
    • Line 29: warning: exported type UpdateClassResponse should have comment or be unexported (golint)
    • Line 37: warning: exported type AddStudentsResponse should have comment or be unexported (golint)
    • Line 45: warning: exported type DeleteStudentsResponse should have comment or be unexported (golint)
    • Line 53: warning: exported type RefreshInviteCodeResponse should have comment or be unexported (golint)
    • Line 61: warning: exported type JoinClassResponse should have comment or be unexported (golint)
    • backend/app/response/user.go
    • Line 7: warning: exported type GetUserResponse should have comment or be unexported (golint)
    • Line 15: warning: exported type GetUsersResponse should have comment or be unexported (golint)
    • Line 28: warning: exported type GetMeResponse should have comment or be unexported (golint)
    • Line 36: warning: exported type UpdateMeResponse should have comment or be unexported (golint)
    • Line 44: warning: exported type GetClassesIManageResponse should have comment or be unexported (golint)
    • Line 52: warning: exported type GetClassesITakeResponse should have comment or be unexported (golint)
    • Line 60: warning: exported type GetUserProblemInfoResponse should have comment or be unexported (golint)
    • backend/app/controller/problem_set.go
    • Line 18: warning: exported function CreateProblemSet should have comment or be unexported (golint)
    • Line 52: warning: exported function CloneProblemSet should have comment or be unexported (golint)
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 95: warning: exported function GetProblemSet should have comment or be unexported (golint)
    • Line 147: warning: exported function UpdateProblemSet should have comment or be unexported (golint)
    • Line 177: warning: exported function AddProblemsToSet should have comment or be unexported (golint)
    • Line 206: warning: exported function DeleteProblemsFromSet should have comment or be unexported (golint)
    • Line 235: warning: exported function DeleteProblemSet should have comment or be unexported (golint)
    • Line 253: warning: exported function GetProblemSetProblem should have comment or be unexported (golint)
    • Line 328: warning: exported function GetProblemSetProblemInputFile should have comment or be unexported (golint)
    • Line 396: warning: exported function GetProblemSetProblemOutputFile should have comment or be unexported (golint)
    • Line 464: warning: exported function RefreshGrades should have comment or be unexported (golint)
    • Line 487: warning: exported function GetGrades should have comment or be unexported (golint)
    • backend/base/log/gorm_logger.go
    • Line 22: warning: exported type GormLogger should have comment or be unexported (golint)
    • Line 24: warning: exported method GormLogger.LogMode should have comment or be unexported (golint)
    • Line 30: warning: exported method GormLogger.Info should have comment or be unexported (golint)
    • Line 34: warning: exported method GormLogger.Warn should have comment or be unexported (golint)
    • Line 42: warning: exported method GormLogger.Trace should have comment or be unexported (golint)
    • backend/app/controller/auth.go
    • Line 16: warning: exported function Login should have comment or be unexported (golint)
    • Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 55: warning: exported function Register should have comment or be unexported (golint)
    • Line 96: warning: exported function EmailRegistered should have comment or be unexported (golint)
    • backend/app/response/resource/class.go
    • Line 5: warning: exported type Class should have comment or be unexported (golint)
    • Line 17: warning: exported type ClassDetail should have comment or be unexported (golint)
    • Line 51: warning: exported function GetClass should have comment or be unexported (golint)
    • Line 57: warning: exported function GetClassDetail should have comment or be unexported (golint)
    • Line 63: warning: exported function GetClassSlice should have comment or be unexported (golint)
    • backend/database/models/class.go
    • Line 9: warning: exported type Class should have comment or be unexported (golint)
    • Line 25: warning: exported method Class.GetID should have comment or be unexported (golint)
    • Line 29: warning: exported method Class.TypeName should have comment or be unexported (golint)
    • Line 33: warning: exported method Class.AddStudents should have comment or be unexported (golint)
    • Line 52: warning: exported method Class.DeleteStudents should have comment or be unexported (golint)
    • Line 63: warning: exported method Class.AfterDelete should have comment or be unexported (golint)
    • backend/base/log/echo_logger.go
    • Line 7: warning: should not use dot imports (golint)
    • Line 15: warning: exported method EchoLogger.Output should have comment or be unexported (golint)
    • Line 19: warning: exported method EchoLogger.SetOutput should have comment or be unexported (golint)
    • Line 23: warning: exported method EchoLogger.Prefix should have comment or be unexported (golint)
    • Line 27: warning: exported method EchoLogger.SetPrefix should have comment or be unexported (golint)
    • Line 31: warning: exported method EchoLogger.Level should have comment or be unexported (golint)
    • Line 35: warning: exported method EchoLogger.SetLevel should have comment or be unexported (golint)
    • Line 39: warning: exported method EchoLogger.SetHeader should have comment or be unexported (golint)
    • Line 43: warning: exported method EchoLogger.Print should have comment or be unexported (golint)
    • Line 47: warning: exported method EchoLogger.Printf should have comment or be unexported (golint)
    • Line 51: warning: exported method EchoLogger.Printj should have comment or be unexported (golint)
    • Line 56: warning: exported method EchoLogger.Debug should have comment or be unexported (golint)
    • Line 60: warning: exported method EchoLogger.Debugf should have comment or be unexported (golint)
    • Line 64: warning: exported method EchoLogger.Debugj should have comment or be unexported (golint)
    • Line 69: warning: exported method EchoLogger.Info should have comment or be unexported (golint)
    • Line 73: warning: exported method EchoLogger.Infof should have comment or be unexported (golint)
    • Line 77: warning: exported method EchoLogger.Infoj should have comment or be unexported (golint)
    • Line 82: warning: exported method EchoLogger.Warn should have comment or be unexported (golint)
    • Line 86: warning: exported method EchoLogger.Warnf should have comment or be unexported (golint)
    • Line 90: warning: exported method EchoLogger.Warnj should have comment or be unexported (golint)
    • Line 99: warning: exported method EchoLogger.Errorf should have comment or be unexported (golint)
    • Line 103: warning: exported method EchoLogger.Errorj should have comment or be unexported (golint)
    • Line 108: warning: exported method EchoLogger.Fatal should have comment or be unexported (golint)
    • Line 112: warning: exported method EchoLogger.Fatalf should have comment or be unexported (golint)
    • Line 116: warning: exported method EchoLogger.Fatalj should have comment or be unexported (golint)
    • Line 121: warning: exported method EchoLogger.Panic should have comment or be unexported (golint)
    • Line 125: warning: exported method EchoLogger.Panicf should have comment or be unexported (golint)
    • Line 129: warning: exported method EchoLogger.Panicj should have comment or be unexported (golint)
    • backend/app/request/submission.go
    • Line 3: warning: exported type CreateSubmissionRequest should have comment or be unexported (golint)
    • Line 8: warning: exported type GetSubmissionRequest should have comment or be unexported (golint)
    • Line 11: warning: exported type GetSubmissionsRequest should have comment or be unexported (golint)
    • backend/app/response/resource/submission.go
    • Line 8: warning: exported type Submission should have comment or be unexported (golint)
    • Line 41: warning: exported function GetSubmission should have comment or be unexported (golint)
    • Line 47: warning: exported function GetSubmissionSlice should have comment or be unexported (golint)
    • Line 55: warning: exported type SubmissionDetail should have comment or be unexported (golint)
    • Line 95: warning: exported function GetSubmissionDetail should have comment or be unexported (golint)
    • Line 101: warning: exported function GetSubmissionDetailSlice should have comment or be unexported (golint)
    • Line 109: warning: exported type Run should have comment or be unexported (golint)
    • Line 146: warning: exported function GetRun should have comment or be unexported (golint)
    • Line 152: warning: exported function GetRunSlice should have comment or be unexported (golint)
    • backend/database/models/problem.go
    • Line 14: warning: exported type TestCase should have comment or be unexported (golint)
    • Line 29: warning: exported type ProblemTag should have comment or be unexported (golint)
    • Line 36: warning: exported type Problem should have comment or be unexported (golint)
    • Line 59: warning: exported type Tag should have comment or be unexported (golint)
    • Line 66: warning: exported method Problem.GetID should have comment or be unexported (golint)
    • Line 70: warning: exported method Problem.TypeName should have comment or be unexported (golint)
    • Line 74: warning: exported method Problem.LoadTestCases should have comment or be unexported (golint)
    • Line 81: warning: exported method Problem.LoadTags should have comment or be unexported (golint)
    • Line 88: warning: exported method Problem.AfterDelete should have comment or be unexported (golint)
    • Line 95: warning: exported method TestCase.AfterDelete should have comment or be unexported (golint)
    • backend/app/controller/images.go
    • Line 22: warning: exported function GetImage should have comment or be unexported (golint)
    • Line 41: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 60: warning: exported function CreateImage should have comment or be unexported (golint)
    • backend/database/models/user.go
    • Line 13: warning: exported type User should have comment or be unexported (golint)
    • Line 36: warning: exported method User.WebAuthnID should have comment or be unexported (golint)
    • Line 42: warning: exported method User.WebAuthnName should have comment or be unexported (golint)
    • Line 46: warning: exported method User.WebAuthnDisplayName should have comment or be unexported (golint)
    • Line 50: warning: exported method User.WebAuthnIcon should have comment or be unexported (golint)
    • Line 54: warning: exported method User.WebAuthnCredentials should have comment or be unexported (golint)
    • Line 69: warning: exported method User.GrantRole should have comment or be unexported (golint)
    • Line 87: warning: exported method User.DeleteRole should have comment or be unexported (golint)
    • Line 108: warning: exported method User.HasRole should have comment or be unexported (golint)
    • Line 141: warning: exported method User.LoadRoles should have comment or be unexported (golint)
    • Line 149: warning: exported method User.Can should have comment or be unexported (golint)
    • backend/app/request/user.go
    • Line 3: warning: exported type GetUserRequest should have comment or be unexported (golint)
    • Line 6: warning: exported type GetUsersRequest should have comment or be unexported (golint)
    • Line 16: warning: exported type GetMeRequest should have comment or be unexported (golint)
    • Line 19: warning: exported type UpdateMeRequest should have comment or be unexported (golint)
    • Line 25: warning: exported type ChangePasswordRequest should have comment or be unexported (golint)
    • Line 30: warning: exported type GetClassesIManageRequest should have comment or be unexported (golint)
    • Line 33: warning: exported type GetClassesITakeRequest should have comment or be unexported (golint)
    • Line 36: warning: exported type GetUserProblemInfoRequest should have comment or be unexported (golint)
    • backend/database/models/problem_set.go
    • Line 11: warning: exported type ProblemSet should have comment or be unexported (golint)
    • Line 30: warning: exported type Grade should have comment or be unexported (golint)
    • Line 47: warning: exported method ProblemSet.AddProblems should have comment or be unexported (golint)
    • Line 66: warning: exported method ProblemSet.DeleteProblems should have comment or be unexported (golint)
    • Line 77: warning: exported method Grade.BeforeSave should have comment or be unexported (golint)
    • Line 90: warning: exported method ProblemSet.AfterDelete should have comment or be unexported (golint)
    • backend/database/models/submission.go
    • Line 9: warning: exported const PriorityDefault should have comment or be unexported (golint)
    • Line 11: warning: exported type Submission should have comment or be unexported (golint)
    • Line 41: warning: exported type Run should have comment or be unexported (golint)
    • Line 74: warning: exported method Submission.LoadRuns should have comment or be unexported (golint)
    • Line 81: warning: exported method Submission.AfterDelete should have comment or be unexported (golint)
    • backend/app/request/judger.go
    • Line 3: warning: comment on exported type GetTaskRequest should be of the form "GetTaskRequest ..." (with optional leading article) (golint)
    • Line 9: warning: exported type UpdateRunRequest should have comment or be unexported (golint)
    • backend/app/response/admin_user.go
    • Line 7: warning: exported type AdminCreateUserResponse should have comment or be unexported (golint)
    • Line 15: warning: exported type AdminUpdateUserResponse should have comment or be unexported (golint)
    • Line 23: warning: exported type AdminGetUserResponse should have comment or be unexported (golint)
    • Line 31: warning: exported type AdminGetUsersResponse should have comment or be unexported (golint)
    • backend/app/response/auth.go
    • Line 7: warning: exported type RegisterResponse should have comment or be unexported (golint)
    • Line 16: warning: exported type LoginResponse should have comment or be unexported (golint)
    • backend/app/response/submission.go
    • Line 7: warning: exported type CreateSubmissionResponse should have comment or be unexported (golint)
    • Line 15: warning: exported type GetSubmissionResponse should have comment or be unexported (golint)
    • Line 23: warning: exported type GetSubmissionsResponse should have comment or be unexported (golint)
    • backend/base/validator/validator.go
    • Line 21: warning: exported var Trans should have comment or be unexported (golint)
    • Line 34: warning: exported function New should have comment or be unexported (golint)
    • Line 49: warning: exported function NewEchoValidator should have comment or be unexported (golint)
    • backend/app/request/problem_set.go
    • Line 5: warning: exported type CreateProblemSetRequest should have comment or be unexported (golint)
    • Line 13: warning: exported type CloneProblemSetRequest should have comment or be unexported (golint)
    • Line 18: warning: exported type GetProblemSetRequest should have comment or be unexported (golint)
    • Line 21: warning: exported type UpdateProblemSetRequest should have comment or be unexported (golint)
    • Line 29: warning: exported type AddProblemsToSetRequest should have comment or be unexported (golint)
    • Line 33: warning: exported type DeleteProblemsFromSetRequest should have comment or be unexported (golint)
    • Line 37: warning: exported type DeleteProblemSetRequest should have comment or be unexported (golint)
    • Line 40: warning: exported type GetProblemSetProblemRequest should have comment or be unexported (golint)
    • Line 43: warning: exported type GetProblemSetProblemInputFileRequest should have comment or be unexported (golint)
    • Line 46: warning: exported type GetProblemSetProblemOutputFileRequest should have comment or be unexported (golint)
    • Line 49: warning: exported type GetGradesRequest should have comment or be unexported (golint)
    • Line 52: warning: exported type RefreshGradesRequest should have comment or be unexported (golint)
    • backend/app/controller/problem_set_submission.go
    • Line 21: warning: exported function ProblemSetCreateSubmission should have comment or be unexported (golint)
    • Line 132: warning: exported function ProblemSetGetSubmission should have comment or be unexported (golint)
    • Line 156: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 214: warning: exported function ProblemSetGetSubmissions should have comment or be unexported (golint)
    • Line 284: warning: exported function ProblemSetGetSubmissionCode should have comment or be unexported (golint)
    • Line 302: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 320: warning: exported function ProblemSetGetRunCompilerOutput should have comment or be unexported (golint)
    • Line 338: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 361: warning: exported function ProblemSetGetRunOutput should have comment or be unexported (golint)
    • Line 380: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 403: warning: exported function ProblemSetGetRunInput should have comment or be unexported (golint)
    • Line 422: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 441: warning: exported function ProblemSetGetRunComparerOutput should have comment or be unexported (golint)
    • Line 462: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • backend/app/controller/submission.go
    • Line 25: warning: exported function CreateSubmission 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 116: warning: exported function GetSubmission should have comment or be unexported (golint)
    • Line 142: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 197: warning: exported function GetSubmissions should have comment or be unexported (golint)
    • Line 242: warning: exported function GetSubmissionCode should have comment or be unexported (golint)
    • Line 249: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 268: warning: exported function GetRunCompilerOutput should have comment or be unexported (golint)
    • Line 275: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 296: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 315: warning: exported function GetRunOutput should have comment or be unexported (golint)
    • Line 322: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 354: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 382: warning: exported function GetRunInput should have comment or be unexported (golint)
    • Line 389: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 422: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 446: warning: exported function GetRunComparerOutput should have comment or be unexported (golint)
    • Line 453: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 486: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • backend/app/controller/webauthn.go
    • Line 25: warning: exported function BeginRegistration should have comment or be unexported (golint)
    • Line 39: warning: exported function FinishRegistration should have comment or be unexported (golint)
    • Line 73: warning: exported function BeginLogin should have comment or be unexported (golint)
    • Line 102: warning: exported function FinishLogin should have comment or be unexported (golint)
    • backend/app/request/class.go
    • Line 3: warning: exported type CreateClassRequest should have comment or be unexported (golint)
    • Line 9: warning: exported type GetClassRequest should have comment or be unexported (golint)
    • Line 12: warning: exported type UpdateClassRequest should have comment or be unexported (golint)
    • Line 18: warning: exported type AddStudentsRequest should have comment or be unexported (golint)
    • Line 22: warning: exported type DeleteStudentsRequest should have comment or be unexported (golint)
    • Line 26: warning: exported type RefreshInviteCodeRequest should have comment or be unexported (golint)
    • Line 29: warning: exported type JoinClassRequest should have comment or be unexported (golint)
    • Line 33: warning: exported type DeleteClassRequest should have comment or be unexported (golint)
    • backend/base/utils/storage.go
    • Line 17: warning: exported function CreateBucket should have comment or be unexported (golint)
    • Line 38: warning: exported function GetPresignedURL should have comment or be unexported (golint)
    • backend/app/controller/admin_user.go
    • Line 17: warning: exported function AdminCreateUser should have comment or be unexported (golint)
    • Line 51: warning: exported function AdminUpdateUser should have comment or be unexported (golint)
    • Line 91: warning: exported function AdminDeleteUser should have comment or be unexported (golint)
    • Line 106: warning: exported function AdminGetUser should have comment or be unexported (golint)
    • Line 128: warning: exported function AdminGetUsers should have comment or be unexported (golint)
    • backend/base/main.go
    • Line 11: warning: exported var Echo should have comment or be unexported (golint)
    • Line 12: warning: exported var Redis should have comment or be unexported (golint)
    • Line 13: warning: exported var DB should have comment or be unexported (golint)
    • Line 14: warning: exported var Storage should have comment or be unexported (golint)
    • Line 15: warning: exported var WebAuthn should have comment or be unexported (golint)
    • backend/base/utils/auth.go
    • Line 13: warning: exported var SessionTimeout should have comment or be unexported (golint)
    • Line 14: warning: exported var RememberMeTimeout should have comment or be unexported (golint)
    • Line 15: warning: exported var SessionCount should have comment or be unexported (golint)
    • Line 26: warning: exported function IsTokenExpired should have comment or be unexported (golint)
    • Line 30: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 35: warning: comment on exported function CleanUpExpiredTokens should be of the form "CleanUpExpiredTokens ..." (golint)
    • backend/base/utils/problem_set.go
    • Line 16: warning: exported function UpdateGrade should have comment or be unexported (golint)
    • Line 67: warning: exported function RefreshGrades should have comment or be unexported (golint)
    • Line 118: warning: exported function CreateEmptyGrades should have comment or be unexported (golint)
    • backend/app/controller/script.go
    • Line 14: warning: exported function GetScript should have comment or be unexported (golint)
    • Line 21: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • backend/app/middleware/permission.go
    • Line 27: warning: exported type PermissionOption should have comment or be unexported (golint)
    • Line 31: warning: exported type UnscopedPermission should have comment or be unexported (golint)
    • Line 35: warning: exported method UnscopedPermission.Check should have comment or be unexported (golint)
    • Line 40: warning: exported type ScopedPermission should have comment or be unexported (golint)
    • Line 46: warning: exported method ScopedPermission.Check should have comment or be unexported (golint)
    • Line 62: warning: exported type OrPermission should have comment or be unexported (golint)
    • Line 67: warning: exported method OrPermission.Check should have comment or be unexported (golint)
    • Line 71: warning: exported type AndPermission should have comment or be unexported (golint)
    • Line 76: warning: exported method AndPermission.Check should have comment or be unexported (golint)
    • Line 80: warning: exported type CustomPermission should have comment or be unexported (golint)
    • Line 84: warning: exported method CustomPermission.Check should have comment or be unexported (golint)
    • Line 88: warning: exported function HasPermission should have comment or be unexported (golint)
    • Line 99: warning: exported function IsTestCaseSample should have comment or be unexported (golint)
    • Line 111: warning: exported function IsTestCaseSampleProblemSet should have comment or be unexported (golint)
    • Line 122: warning: exported function ProblemSetStarted should have comment or be unexported (golint)
    • Line 132: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • backend/app/response/resource/user.go
    • Line 5: warning: exported type User should have comment or be unexported (golint)
    • Line 12: warning: exported type UserForAdmin should have comment or be unexported (golint)
    • Line 44: warning: exported function GetUser should have comment or be unexported (golint)
    • Line 50: warning: exported function GetUserForAdmin should have comment or be unexported (golint)
    • Line 56: warning: exported function GetUserSlice should have comment or be unexported (golint)
    • backend/base/utils/origins.go
    • Line 7: warning: exported var Origins should have comment or be unexported (golint)
    • Line 9: warning: exported function InitOrigin should have comment or be unexported (golint)
    • backend/app/controller/class.go
    • Line 16: warning: exported function CreateClass should have comment or be unexported (golint)
    • Line 46: warning: exported function GetClass should have comment or be unexported (golint)
    • Line 66: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 84: warning: exported function UpdateClass should have comment or be unexported (golint)
    • Line 94: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 113: warning: exported function RefreshInviteCode should have comment or be unexported (golint)
    • Line 118: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 135: warning: exported function AddStudents should have comment or be unexported (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 163: warning: exported function DeleteStudents should have comment or be unexported (golint)
    • Line 173: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 191: warning: exported function JoinClass should have comment or be unexported (golint)
    • Line 201: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 227: warning: exported function DeleteClass should have comment or be unexported (golint)
    • backend/app/request/problem.go
    • Line 3: warning: exported type CreateProblemRequest should have comment or be unexported (golint)
    • Line 19: warning: exported type UpdateProblemRequest should have comment or be unexported (golint)
    • Line 35: warning: exported type DeleteProblemRequest should have comment or be unexported (golint)
    • Line 38: warning: exported type CreateTestCaseRequest should have comment or be unexported (golint)
    • Line 45: warning: exported type GetTestCaseInputFileRequest should have comment or be unexported (golint)
    • Line 48: warning: exported type GetTestCaseOutputFileRequest should have comment or be unexported (golint)
    • Line 51: warning: exported type UpdateTestCaseRequest should have comment or be unexported (golint)
    • Line 58: warning: exported type DeleteTestCaseRequest should have comment or be unexported (golint)
    • Line 61: warning: exported type DeleteTestCasesRequest should have comment or be unexported (golint)
    • Line 64: warning: exported type GetProblemRequest should have comment or be unexported (golint)
    • Line 67: warning: exported type GetProblemsRequest should have comment or be unexported (golint)
    • Line 80: warning: exported type GetRandomProblemRequest should have comment or be unexported (golint)
    • backend/base/log/logging.go
    • Line 16: warning: exported function InitFromConfig should have comment or be unexported (golint)
    • Line 48: warning: exported function Debug should have comment or be unexported (golint)
    • Line 52: warning: exported function Info should have comment or be unexported (golint)
    • Line 56: warning: exported function Warning should have comment or be unexported (golint)
    • Line 60: warning: exported function Error should have comment or be unexported (golint)
    • Line 64: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 68: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 72: warning: exported function Infof should have comment or be unexported (golint)
    • Line 76: warning: exported function Warningf should have comment or be unexported (golint)
    • Line 80: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 84: warning: exported function Fatalf should have comment or be unexported (golint)
    • Line 88: warning: exported function Disable should have comment or be unexported (golint)
    • Line 92: warning: exported function Disabled should have comment or be unexported (golint)
    • backend/base/utils/password.go
    • Line 9: warning: exported function HashPassword should have comment or be unexported (golint)
    • Line 18: warning: exported function VerifyPassword should have comment or be unexported (golint)
    • Line 22: warning: exported function GetToken should have comment or be unexported (golint)
    • backend/app/request/auth.go
    • Line 3: warning: exported type LoginRequest should have comment or be unexported (golint)
    • Line 9: warning: exported type RegisterRequest should have comment or be unexported (golint)
    • Line 16: warning: exported type EmailRegistered should have comment or be unexported (golint)
    • backend/app/request/script.go
    • Line 3: warning: comment on exported type GetScriptRequest should be of the form "GetScriptRequest ..." (with optional leading article) (golint)
    • backend/database/iterator.go
    • Line 8: warning: exported const IteratorLimit should have comment or be unexported (golint)
    • Line 10: warning: exported type Iterator should have comment or be unexported (golint)
    • Line 19: warning: exported function NewIterator should have comment or be unexported (golint)
    • Line 53: warning: exported method Iterator.Next should have comment or be unexported (golint)
    • Line 74: warning: exported method Iterator.Index should have comment or be unexported (golint)
    • backend/database/models/permission.go
    • Line 8: warning: exported type HasRole should have comment or be unexported (golint)
    • Line 13: warning: exported type UserHasRole should have comment or be unexported (golint)
    • Line 21: warning: exported type Role should have comment or be unexported (golint)
    • Line 28: warning: exported type Permission should have comment or be unexported (golint)
    • Line 34: warning: exported method Role.AddPermission should have comment or be unexported (golint)
    • Line 42: warning: exported method UserHasRole.MarshalJSON should have comment or be unexported (golint)
    • backend/app/request/admin_user.go
    • Line 3: warning: exported type AdminCreateUserRequest should have comment or be unexported (golint)
    • Line 11: warning: exported type AdminUpdateUserRequest should have comment or be unexported (golint)
    • Line 19: warning: exported type AdminDeleteUserRequest should have comment or be unexported (golint)
    • Line 22: warning: exported type AdminGetUserRequest should have comment or be unexported (golint)
    • Line 25: warning: exported type AdminGetUsersRequest should have comment or be unexported (golint)
    • backend/app/response/problem.go
    • Line 7: warning: exported type GetProblemResponse should have comment or be unexported (golint)
    • Line 15: warning: exported type GetProblemsResponse should have comment or be unexported (golint)
    • Line 28: warning: exported type CreateProblemResponse should have comment or be unexported (golint)
    • Line 36: warning: exported type GetProblemResponseForAdmin should have comment or be unexported (golint)
    • Line 44: warning: exported type GetProblemsResponseForAdmin should have comment or be unexported (golint)
    • Line 57: warning: exported type UpdateProblemResponse should have comment or be unexported (golint)
    • Line 65: warning: exported type CreateTestCaseResponse should have comment or be unexported (golint)
    • Line 73: warning: exported type UpdateTestCaseResponse should have comment or be unexported (golint)
    • Line 81: warning: exported type GetRandomProblemResponse should have comment or be unexported (golint)
    • backend/app/response/problem_set.go
    • Line 5: warning: exported type CreateProblemSetResponse should have comment or be unexported (golint)
    • Line 13: warning: exported type CloneProblemSetResponse should have comment or be unexported (golint)
    • Line 21: warning: exported type GetProblemSetResponseForAdmin should have comment or be unexported (golint)
    • Line 29: warning: exported type GetProblemSetResponse should have comment or be unexported (golint)
    • Line 37: warning: exported type GetProblemSetResponseSummary should have comment or be unexported (golint)
    • Line 45: warning: exported type UpdateProblemSetResponse should have comment or be unexported (golint)
    • Line 53: warning: exported type AddProblemsToSetResponse should have comment or be unexported (golint)
    • Line 61: warning: exported type DeleteProblemsFromSetResponse should have comment or be unexported (golint)
    • Line 69: warning: exported type GetProblemSetProblemResponseForAdmin should have comment or be unexported (golint)
    • Line 77: warning: exported type GetProblemSetProblemResponse should have comment or be unexported (golint)
    • Line 85: warning: exported type GetGradesResponse should have comment or be unexported (golint)
    • Line 93: warning: exported type RefreshGradesResponse should have comment or be unexported (golint)
    • backend/app/response/problem_set_submission.go
    • Line 7: warning: exported type ProblemSetCreateSubmissionResponse should have comment or be unexported (golint)
    • Line 15: warning: exported type ProblemSetGetSubmissionResponse should have comment or be unexported (golint)
    • Line 23: warning: exported type ProblemSetGetSubmissionsResponse should have comment or be unexported (golint)
    • backend/app/response/resource/permission.go
    • Line 5: warning: exported type Permission should have comment or be unexported (golint)
    • Line 10: warning: exported type Role should have comment or be unexported (golint)
    • Line 33: warning: exported function GetPermission should have comment or be unexported (golint)
    • Line 39: warning: exported function GetRole should have comment or be unexported (golint)
    • Line 45: warning: exported function GetRoleSlice should have comment or be unexported (golint)
    • backend/app/controller/problem.go
    • Line 22: warning: exported function GetProblem should have comment or be unexported (golint)
    • Line 52: warning: exported function GetProblems should have comment or be unexported (golint)
    • Line 170: warning: exported function GetProblemAttachmentFile should have comment or be unexported (golint)
    • Line 188: warning: exported function CreateProblem should have comment or be unexported (golint)
    • Line 258: warning: exported function UpdateProblem should have comment or be unexported (golint)
    • Line 332: warning: exported function DeleteProblem should have comment or be unexported (golint)
    • Line 365: warning: exported function CreateTestCase should have comment or be unexported (golint)
    • Line 418: warning: exported function GetTestCaseInputFile should have comment or be unexported (golint)
    • Line 443: warning: exported function GetTestCaseOutputFile should have comment or be unexported (golint)
    • Line 468: warning: exported function UpdateTestCase should have comment or be unexported (golint)
    • Line 514: warning: exported function DeleteTestCase should have comment or be unexported (golint)
    • Line 531: warning: exported function DeleteTestCases should have comment or be unexported (golint)
    • Line 553: warning: exported function GetRandomProblem should have comment or be unexported (golint)
    • backend/app/controller/user.go
    • Line 18: warning: exported function GetUser should have comment or be unexported (golint)
    • Line 37: warning: exported function GetMe should have comment or be unexported (golint)
    • Line 53: warning: exported function GetUsers should have comment or be unexported (golint)
    • Line 104: warning: exported function UpdateMe should have comment or be unexported (golint)
    • Line 141: warning: exported function ChangePassword should have comment or be unexported (golint)
    • Line 168: warning: exported function GetClassesIManage should have comment or be unexported (golint)
    • Line 185: warning: exported function GetClassesITake should have comment or be unexported (golint)
    • Line 202: warning: exported function GetUserProblemInfo should have comment or be unexported (golint)
    • backend/database/migrate.go
    • Line 14: warning: exported function GetMigration should have comment or be unexported (golint)
    • Line 1110: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1113: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1251: warning: exported function Migrate should have comment or be unexported (golint)
    • backend/app/response/resource/problem_set.go
    • Line 10: warning: exported type ProblemSetWithGrades should have comment or be unexported (golint)
    • Line 24: warning: exported type ProblemSetDetail should have comment or be unexported (golint)
    • Line 37: warning: exported type ProblemSet should have comment or be unexported (golint)
    • Line 50: warning: exported type ProblemSetSummary should have comment or be unexported (golint)
    • Line 61: warning: exported type Grade should have comment or be unexported (golint)
    • Line 111: warning: exported function GetProblemSet should have comment or be unexported (golint)
    • Line 117: warning: exported function GetProblemSetWithGrades should have comment or be unexported (golint)
    • Line 123: warning: exported function GetProblemSetDetail should have comment or be unexported (golint)
    • Line 129: warning: exported function GetProblemSetSummary should have comment or be unexported (golint)
    • Line 135: warning: exported function GetProblemSetSummarySlice should have comment or be unexported (golint)
    • Line 143: warning: exported function GetProblemSetSlice should have comment or be unexported (golint)
    • Line 163: warning: exported function GetGrade should have comment or be unexported (golint)
    • Line 169: warning: exported function GetGradeSlice should have comment or be unexported (golint)
    • backend/app/middleware/authentication.go
    • Line 17: warning: exported function Authentication should have comment or be unexported (golint)
    • Line 42: warning: exported function Logged should have comment or be unexported (golint)
    • Line 52: warning: comment on exported function AllowGuest should be of the form "AllowGuest ..." (golint)
    • backend/base/utils/query_helper.go
    • Line 16: warning: exported function Paginator should have comment or be unexported (golint)
    • Line 65: warning: exported function Sorter should have comment or be unexported (golint)
    • Line 91: warning: exported function FindUser should have comment or be unexported (golint)
    • Line 99: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 107: warning: comment on exported function FindProblem should be of the form "FindProblem ..." (golint)
    • Line 116: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 128: warning: comment on exported function FindTestCase should be of the form "FindTestCase ..." (golint)
    • Line 149: warning: exported function FindSubmission should have comment or be unexported (golint)
    • Line 155: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • backend/app/request/problem_set_submission.go
    • Line 3: warning: exported type ProblemSetCreateSubmissionRequest should have comment or be unexported (golint)
    • Line 8: warning: exported type ProblemSetGetSubmissionRequest should have comment or be unexported (golint)
    • Line 11: warning: exported type ProblemSetGetSubmissionsRequest should have comment or be unexported (golint)
    • backend/app/response/resource/problem.go
    • Line 9: warning: exported type TestCaseForAdmin should have comment or be unexported (golint)
    • Line 20: warning: exported type TestCase should have comment or be unexported (golint)
    • Line 28: warning: exported type ProblemForAdmin should have comment or be unexported (golint)
    • Line 46: warning: exported type Problem should have comment or be unexported (golint)
    • Line 61: warning: exported type Tag should have comment or be unexported (golint)
    • Line 65: warning: exported method Tag.MarshalJSON should have comment or be unexported (golint)
    • Line 69: warning: exported method Tag.UnmarshalJSON should have comment or be unexported (golint)
    • Line 73: warning: exported method Tag.Convert should have comment or be unexported (golint)
    • Line 77: warning: exported type ProblemSummary should have comment or be unexported (golint)
    • Line 90: warning: exported type ProblemSummaryForAdmin should have comment or be unexported (golint)
    • Line 123: warning: exported function GetTestCaseForAdmin should have comment or be unexported (golint)
    • Line 129: warning: exported function GetTestCase should have comment or be unexported (golint)
    • Line 222: warning: exported function GetProblemForAdmin should have comment or be unexported (golint)
    • Line 228: warning: exported function GetProblemForAdminSlice should have comment or be unexported (golint)
    • Line 236: warning: exported function GetProblemSummaryForAdmin should have comment or be unexported (golint)
    • Line 242: warning: exported function GetProblemSummaryForAdminSlice should have comment or be unexported (golint)
    • Line 250: warning: exported function GetProblem should have comment or be unexported (golint)
    • Line 256: warning: exported function GetProblemSlice should have comment or be unexported (golint)
    • Line 264: warning: exported function GetProblemSummary should have comment or be unexported (golint)
    • Line 270: warning: exported function GetProblemSummarySlice should have comment or be unexported (golint)
    • backend/base/utils/helpers.go
    • Line 18: warning: exported function PanicIfDBError should have comment or be unexported (golint)
    • Line 24: warning: error should be the last type when returning multiple items (golint)
    • Line 24: warning: exported function BindAndValidate should have comment or be unexported (golint)
    • Line 47: warning: context.Context should be the first parameter of a function (golint)
    • Line 47: warning: exported function MustPutObject should have comment or be unexported (golint)
    • Line 60: warning: exported function MustGetObject should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words