Preparing report...

Report for gitlab.com/geeks-accelerator/oss/saas-starter-kit

A    Great!    Found 76 issues across 122 files

Tweet

gofmt98%

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!


gocyclo73%

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.

    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/cmd/web-app/handlers/user.go
    • Line 505: warning: cyclomatic complexity 24 of function (*UserRepos).VirtualLogin() is high (> 15) (gocyclo)
    • Line 362: warning: cyclomatic complexity 21 of function (*UserRepos).Update() is high (> 15) (gocyclo)
    • Line 714: warning: cyclomatic complexity 20 of function (*UserRepos).SwitchAccount() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 19 of function (*UserRepos).ResetConfirm() is high (> 15) (gocyclo)
    • Line 50: warning: cyclomatic complexity 17 of function (UserRepos).Login() is high (> 15) (gocyclo)

golint48%

Golint is a linter for Go source code.

    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/webroute/webroute.go
    • Line 13: warning: exported type WebRoute should have comment or be unexported (golint)
    • Line 18: warning: exported function New should have comment or be unexported (golint)
    • Line 36: warning: exported method WebRoute.WebAppUrl should have comment or be unexported (golint)
    • Line 42: warning: exported method WebRoute.WebApiUrl should have comment or be unexported (golint)
    • Line 48: warning: exported method WebRoute.UserResetPassword should have comment or be unexported (golint)
    • Line 54: warning: exported method WebRoute.UserInviteAccept should have comment or be unexported (golint)
    • Line 60: warning: exported method WebRoute.ApiDocs should have comment or be unexported (golint)
    • Line 66: warning: exported method WebRoute.ApiDocsJson should have comment or be unexported (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/cmd/web-app/handlers/user.go
    • Line 27: warning: comment on exported type UserRepos should be of the form "UserRepos ..." (with optional leading article) (golint)
    • Line 94: 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)
    • Line 184: 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)
    • Line 254: 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)
    • Line 269: 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)
    • Line 296: 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)
    • Line 399: 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)
    • Line 420: 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)
    • Line 560: 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)
    • Line 713: warning: comment on exported method UserRepos.SwitchAccount should be of the form "SwitchAccount ..." (golint)
    • Line 766: 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)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext/context.go
    • Line 16: warning: exported var ErrContextRequired should have comment or be unexported (golint)
    • Line 28: warning: exported function ContextValues should have comment or be unexported (golint)
    • Line 40: warning: exported type Env should have comment or be unexported (golint)
    • Line 43: warning: don't use underscores in Go names; var Env_Dev should be EnvDev (golint)
    • Line 43: warning: exported var Env_Dev should have comment or be unexported (golint)
    • Line 44: warning: don't use underscores in Go names; var Env_Stage should be EnvStage (golint)
    • Line 45: warning: don't use underscores in Go names; var Env_Prod should be EnvProd (golint)
    • Line 48: warning: comment on exported var EnvNames should be of the form "EnvNames ..." (golint)
    • Line 55: warning: exported function ContextEnv should have comment or be unexported (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/platform/web/request.go
    • Line 97: warning: exported function RequestIsJson should have comment or be unexported (golint)
    • Line 122: warning: exported function RequestIsTLS should have comment or be unexported (golint)
    • Line 126: warning: exported function RequestIsWebSocket should have comment or be unexported (golint)
    • Line 131: warning: exported function RequestIsImage should have comment or be unexported (golint)
    • Line 136: warning: exported function RequestScheme should have comment or be unexported (golint)
    • Line 157: warning: exported function RequestRealIP should have comment or be unexported (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/user_account/models.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 175: warning: don't use underscores in Go names; const UserAccountStatus_Active should be UserAccountStatusActive (golint)
    • Line 178: warning: don't use underscores in Go names; const UserAccountStatus_Invited should be UserAccountStatusInvited (golint)
    • Line 181: warning: don't use underscores in Go names; const UserAccountStatus_Disabled should be UserAccountStatusDisabled (golint)
    • Line 185: warning: don't use underscores in Go names; var UserAccountStatus_Values should be UserAccountStatusValues (golint)
    • Line 192: warning: don't use underscores in Go names; func UserAccountStatus_ValuesInterface should be UserAccountStatusValuesInterface (golint)
    • Line 235: warning: don't use underscores in Go names; const UserAccountRole_Admin should be UserAccountRoleAdmin (golint)
    • Line 239: warning: don't use underscores in Go names; const UserAccountRole_User should be UserAccountRoleUser (golint)
    • Line 243: warning: don't use underscores in Go names; var UserAccountRole_Values should be UserAccountRoleValues (golint)
    • Line 249: warning: don't use underscores in Go names; func UserAccountRole_ValuesInterface should be UserAccountRoleValuesInterface (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/cmd/web-app/handlers/account.go
    • Line 59: warning: exported type AccountUpdateRequest should have comment or be unexported (golint)
    • Line 129: 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)
    • Line 151: 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)
    • Line 172: 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)
    • Line 193: 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)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/user/user.go
    • Line 258: warning: comment on exported function UniqueEmail should be of the form "UniqueEmail ..." (golint)
    • Line 368: warning: comment on exported method Repository.CreateInvite should be of the form "CreateInvite ..." (golint)
    • Line 577: warning: comment on exported method Repository.UpdatePassword should be of the form "UpdatePassword ..." (golint)
    • Line 1002: warning: exported type MockUserResponse should have comment or be unexported (golint)
    • Line 1033: warning: exported function MockRepository should have comment or be unexported (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/cmd/web-app/handlers/api_geo.go
    • Line 16: warning: comment on exported type Geo should be of the form "Geo ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported method Geo.GeonameByPostalCode should be of the form "GeonameByPostalCode ..." (golint)
    • Line 60: warning: comment on exported method Geo.PostalCodesAutocomplete should be of the form "PostalCodesAutocomplete ..." (golint)
    • Line 87: warning: comment on exported method Geo.RegionsAutocomplete should be of the form "RegionsAutocomplete ..." (golint)
    • Line 132: warning: comment on exported method Geo.CountryTimezones should be of the form "CountryTimezones ..." (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/checklist/models.go
    • Line 139: warning: don't use underscores in Go names; const ChecklistStatus_Active should be ChecklistStatusActive (golint)
    • Line 141: warning: don't use underscores in Go names; const ChecklistStatus_Disabled should be ChecklistStatusDisabled (golint)
    • Line 145: warning: don't use underscores in Go names; var ChecklistStatus_Values should be ChecklistStatusValues (golint)
    • Line 151: warning: don't use underscores in Go names; func ChecklistStatus_ValuesInterface should be ChecklistStatusValuesInterface (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/cmd/web-app/handlers/users.go
    • Line 233: 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)
    • Line 245: 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)
    • Line 264: 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)
    • Line 426: 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)
    • Line 438: 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)
    • Line 456: 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)
    • Line 478: 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)
    • Line 590: 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)
    • Line 638: warning: comment on exported method Users.InviteAccept should be of the form "InviteAccept ..." (golint)
    • Line 698: 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)
    • Line 720: 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)
    • Line 769: 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)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/account/models.go
    • Line 104: warning: exported method AccountResponse.UnmarshalBinary should have comment or be unexported (golint)
    • Line 111: warning: exported method AccountResponse.MarshalBinary should have comment or be unexported (golint)
    • Line 200: warning: don't use underscores in Go names; const AccountStatus_Active should be AccountStatusActive (golint)
    • Line 203: warning: don't use underscores in Go names; const AccountStatus_Pending should be AccountStatusPending (golint)
    • Line 206: warning: don't use underscores in Go names; const AccountStatus_Disabled should be AccountStatusDisabled (golint)
    • Line 210: warning: don't use underscores in Go names; var AccountStatus_Values should be AccountStatusValues (golint)
    • Line 217: warning: don't use underscores in Go names; func AccountStatus_ValuesInterface should be AccountStatusValuesInterface (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/platform/web/webcontext/flash_message.go
    • Line 10: warning: exported type FlashType should have comment or be unexported (golint)
    • Line 13: warning: don't use underscores in Go names; var FlashType_Success should be FlashTypeSuccess (golint)
    • Line 13: warning: exported var FlashType_Success should have comment or be unexported (golint)
    • Line 14: warning: don't use underscores in Go names; var FlashType_Info should be FlashTypeInfo (golint)
    • Line 15: warning: don't use underscores in Go names; var FlashType_Warning should be FlashTypeWarning (golint)
    • Line 16: warning: don't use underscores in Go names; var FlashType_Error should be FlashTypeError (golint)
    • Line 19: warning: exported type FlashMsg should have comment or be unexported (golint)
    • Line 27: warning: exported type FlashMsgResponse should have comment or be unexported (golint)
    • Line 35: warning: exported method FlashMsg.Response should have comment or be unexported (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/platform/datatable/datatable.go
    • Line 22: warning: exported const DatatableStateCacheTtl should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported type Datatable should have comment or be unexported (golint)
    • Line 51: warning: exported type Request should have comment or be unexported (golint)
    • Line 60: warning: exported type Column should have comment or be unexported (golint)
    • Line 67: warning: exported type ColumnValue should have comment or be unexported (golint)
    • Line 71: warning: exported type Search should have comment or be unexported (golint)
    • Line 76: warning: exported type Order should have comment or be unexported (golint)
    • Line 80: warning: exported type Response should have comment or be unexported (golint)
    • Line 89: warning: exported type DisplayField should have comment or be unexported (golint)
    • Line 102: warning: exported type FilterOptionItem should have comment or be unexported (golint)
    • Line 108: warning: exported method Request.CacheKey should have comment or be unexported (golint)
    • Line 121: warning: comment on exported function ParseQueryValues should be of the form "ParseQueryValues ..." (golint)
    • Line 278: warning: exported function New should have comment or be unexported (golint)
    • Line 372: warning: exported method Datatable.CaseSensitive should have comment or be unexported (golint)
    • Line 376: warning: exported method Datatable.SetAjaxUrl should have comment or be unexported (golint)
    • Line 391: warning: exported method Datatable.HasCache should have comment or be unexported (golint)
    • Line 413: warning: exported method Datatable.Handled should have comment or be unexported (golint)
    • Line 417: warning: exported method Datatable.Response should have comment or be unexported (golint)
    • Line 421: warning: exported method Datatable.StoreFilteredField should have comment or be unexported (golint)
    • Line 425: warning: exported method Datatable.GetFilteredFieldValues should have comment or be unexported (golint)
    • Line 429: warning: exported method Datatable.DisableCache should have comment or be unexported (golint)
    • Line 433: warning: exported method Datatable.Render should have comment or be unexported (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/platform/web/models.go
    • Line 13: warning: exported const DatetimeFormatLocal should have comment or be unexported (golint)
    • Line 14: warning: exported const DateFormatLocal should have comment or be unexported (golint)
    • Line 15: warning: exported const TimeFormatLocal should have comment or be unexported (golint)
    • Line 119: warning: comment on exported type EnumMultiResponse should be of the form "EnumMultiResponse ..." (with optional leading article) (golint)
    • Line 160: warning: exported type GravatarResponse should have comment or be unexported (golint)
    • Line 165: warning: exported function NewGravatarResponse should have comment or be unexported (golint)
    • /gitlab.com/geeks-accelerator/oss/saas-starter-kit/internal/account/account_preference/models.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 123: warning: don't use underscores in Go names; var AccountPreference_Datetime_Format should be AccountPreferenceDatetimeFormat (golint)
    • Line 124: warning: don't use underscores in Go names; var AccountPreference_Date_Format should be AccountPreferenceDateFormat (golint)
    • Line 125: warning: don't use underscores in Go names; var AccountPreference_Time_Format should be AccountPreferenceTimeFormat (golint)
    • Line 126: warning: don't use underscores in Go names; var AccountPreference_Datetime_Format_Default should be AccountPreferenceDatetimeFormatDefault (golint)
    • Line 127: warning: don't use underscores in Go names; var AccountPreference_Date_Format_Default should be AccountPreferenceDateFormatDefault (golint)
    • Line 128: warning: don't use underscores in Go names; var AccountPreference_Time_Format_Default should be AccountPreferenceTimeFormatDefault (golint)
    • Line 132: warning: don't use underscores in Go names; var AccountPreferenceName_Values should be AccountPreferenceNameValues (golint)
    • Line 139: warning: don't use underscores in Go names; func AccountPreferenceName_ValuesInterface should be AccountPreferenceNameValuesInterface (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words