Preparing report...

Report for github.com/mattermost/mmctl

A+    Excellent!    Found 38 issues across 99 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!


golint63%

Golint is a linter for Go source code.

    • mmctl/commands/system.go
    • Line 16: warning: exported var SystemCmd should have comment or be unexported (golint)
    • Line 22: warning: exported var SystemGetBusyCmd should have comment or be unexported (golint)
    • Line 31: warning: exported var SystemSetBusyCmd should have comment or be unexported (golint)
    • Line 40: warning: exported var SystemClearBusyCmd should have comment or be unexported (golint)
    • Line 49: warning: exported var SystemVersionCmd should have comment or be unexported (golint)
    • Line 58: warning: exported var SystemStatusCmd should have comment or be unexported (golint)
    • mmctl/commands/token.go
    • Line 14: warning: exported var TokenCmd should have comment or be unexported (golint)
    • Line 19: warning: exported var GenerateUserTokenCmd should have comment or be unexported (golint)
    • Line 28: warning: exported var RevokeUserTokenCmd should have comment or be unexported (golint)
    • Line 37: warning: exported var ListUserTokensCmd should have comment or be unexported (golint)
    • mmctl/commands/webhook.go
    • Line 16: warning: exported type StoreResult should have comment or be unexported (golint)
    • Line 21: warning: exported var WebhookCmd should have comment or be unexported (golint)
    • Line 26: warning: exported var ListWebhookCmd should have comment or be unexported (golint)
    • Line 34: warning: exported var ShowWebhookCmd should have comment or be unexported (golint)
    • Line 43: warning: exported var CreateIncomingWebhookCmd should have comment or be unexported (golint)
    • Line 51: warning: exported var ModifyIncomingWebhookCmd should have comment or be unexported (golint)
    • Line 60: warning: exported var CreateOutgoingWebhookCmd should have comment or be unexported (golint)
    • Line 69: warning: exported var ModifyOutgoingWebhookCmd should have comment or be unexported (golint)
    • Line 78: warning: exported var DeleteWebhookCmd should have comment or be unexported (golint)
    • mmctl/commands/auth.go
    • Line 24: warning: exported var AuthCmd should have comment or be unexported (golint)
    • Line 29: warning: exported var LoginCmd should have comment or be unexported (golint)
    • Line 41: warning: exported var CurrentCmd should have comment or be unexported (golint)
    • Line 49: warning: exported var SetCmd should have comment or be unexported (golint)
    • Line 58: warning: exported var ListCmd should have comment or be unexported (golint)
    • Line 66: warning: exported var RenewCmd should have comment or be unexported (golint)
    • Line 75: warning: exported var DeleteCmd should have comment or be unexported (golint)
    • Line 84: warning: exported var CleanCmd should have comment or be unexported (golint)
    • mmctl/commands/auth_utils.go
    • Line 19: warning: exported const MethodPassword should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type Credentials should have comment or be unexported (golint)
    • Line 37: warning: exported type CredentialsList should have comment or be unexported (golint)
    • Line 79: warning: exported function ReadCredentialsList should have comment or be unexported (golint)
    • Line 99: warning: exported function GetCurrentCredentials should have comment or be unexported (golint)
    • Line 113: warning: exported function GetCredentials should have comment or be unexported (golint)
    • Line 127: warning: exported function SaveCredentials should have comment or be unexported (golint)
    • Line 141: warning: exported function SaveCredentialsList should have comment or be unexported (golint)
    • Line 153: warning: exported function SetCurrent should have comment or be unexported (golint)
    • Line 176: warning: exported function CleanCredentials should have comment or be unexported (golint)
    • Line 192: warning: exported function SetUser should have comment or be unexported (golint)
    • mmctl/commands/command.go
    • Line 18: warning: exported var CommandCmd should have comment or be unexported (golint)
    • Line 23: warning: exported var CommandCreateCmd should have comment or be unexported (golint)
    • Line 32: warning: exported var CommandListCmd should have comment or be unexported (golint)
    • Line 40: warning: exported var CommandDeleteCmd should have comment or be unexported (golint)
    • Line 50: warning: exported var CommandArchiveCmd should have comment or be unexported (golint)
    • Line 59: warning: exported var CommandModifyCmd should have comment or be unexported (golint)
    • Line 68: warning: exported var CommandMoveCmd should have comment or be unexported (golint)
    • Line 77: warning: exported var CommandShowCmd should have comment or be unexported (golint)
    • mmctl/commands/errors.go
    • Line 24: warning: exported type NotFoundError should have comment or be unexported (golint)
    • Line 32: warning: exported type BadRequestError should have comment or be unexported (golint)
    • mmctl/commands/init.go
    • Line 34: warning: exported function CheckVersionMatch should have comment or be unexported (golint)
    • Line 96: warning: exported function VerifyCertificates should have comment or be unexported (golint)
    • Line 106: warning: exported function NewAPIv4Client should have comment or be unexported (golint)
    • Line 132: warning: exported function InitClientWithUsernameAndPassword should have comment or be unexported (golint)
    • Line 142: warning: exported function InitClientWithMFA should have comment or be unexported (golint)
    • Line 151: warning: exported function InitClientWithCredentials should have comment or be unexported (golint)
    • Line 165: warning: exported function InitClient should have comment or be unexported (golint)
    • Line 173: warning: exported function InitWebSocketClient should have comment or be unexported (golint)
    • Line 185: warning: exported function InitUnixClient should have comment or be unexported (golint)
    • mmctl/commands/user.go
    • Line 20: warning: exported var UserCmd should have comment or be unexported (golint)
    • Line 25: warning: exported var UserActivateCmd should have comment or be unexported (golint)
    • Line 35: warning: exported var UserDeactivateCmd should have comment or be unexported (golint)
    • Line 45: warning: exported var UserCreateCmd should have comment or be unexported (golint)
    • Line 63: warning: exported var UserInviteCmd should have comment or be unexported (golint)
    • Line 74: warning: exported var SendPasswordResetEmailCmd should have comment or be unexported (golint)
    • Line 82: warning: exported var UpdateUserEmailCmd should have comment or be unexported (golint)
    • Line 90: warning: exported var UpdateUsernameCmd should have comment or be unexported (golint)
    • Line 99: warning: exported var ChangePasswordUserCmd should have comment or be unexported (golint)
    • Line 122: warning: exported var ResetUserMfaCmd should have comment or be unexported (golint)
    • Line 131: warning: exported var DeleteUsersCmd should have comment or be unexported (golint)
    • Line 141: warning: exported var DeleteAllUsersCmd should have comment or be unexported (golint)
    • Line 151: warning: exported var SearchUserCmd should have comment or be unexported (golint)
    • Line 159: warning: exported var ListUsersCmd should have comment or be unexported (golint)
    • Line 168: warning: exported var VerifyUserEmailWithoutTokenCmd should have comment or be unexported (golint)
    • Line 177: warning: exported var PromoteGuestToUserCmd should have comment or be unexported (golint)
    • Line 186: warning: exported var DemoteUserToGuestCmd should have comment or be unexported (golint)
    • Line 195: warning: exported var UserConvertCmd should have comment or be unexported (golint)
    • Line 211: warning: exported var MigrateAuthCmd should have comment or be unexported (golint)
    • mmctl/commands/config.go
    • Line 28: warning: exported var ConfigCmd should have comment or be unexported (golint)
    • Line 33: warning: exported var ConfigGetCmd should have comment or be unexported (golint)
    • Line 42: warning: exported var ConfigSetCmd should have comment or be unexported (golint)
    • Line 51: warning: exported var ConfigPatchCmd should have comment or be unexported (golint)
    • Line 60: warning: exported var ConfigEditCmd should have comment or be unexported (golint)
    • Line 69: warning: exported var ConfigResetCmd should have comment or be unexported (golint)
    • Line 78: warning: exported var ConfigShowCmd should have comment or be unexported (golint)
    • Line 87: warning: exported var ConfigReloadCmd should have comment or be unexported (golint)
    • Line 96: warning: exported var ConfigMigrateCmd should have comment or be unexported (golint)
    • Line 105: warning: exported var ConfigSubpathCmd should have comment or be unexported (golint)
    • mmctl/commands/export.go
    • Line 18: warning: exported var ExportCmd should have comment or be unexported (golint)
    • Line 23: warning: exported var ExportCreateCmd should have comment or be unexported (golint)
    • Line 30: warning: exported var ExportDownloadCmd should have comment or be unexported (golint)
    • Line 42: warning: exported var ExportDeleteCmd should have comment or be unexported (golint)
    • Line 51: warning: exported var ExportListCmd should have comment or be unexported (golint)
    • Line 59: warning: exported var ExportJobCmd should have comment or be unexported (golint)
    • Line 64: warning: exported var ExportJobListCmd should have comment or be unexported (golint)
    • Line 73: warning: exported var ExportJobShowCmd should have comment or be unexported (golint)
    • mmctl/commands/ldap.go
    • Line 13: warning: exported var LdapCmd should have comment or be unexported (golint)
    • Line 18: warning: exported var LdapSyncCmd should have comment or be unexported (golint)
    • Line 26: warning: exported var LdapIDMigrate should have comment or be unexported (golint)
    • mmctl/commands/plugin_marketplace.go
    • Line 18: warning: exported var PluginMarketplaceCmd should have comment or be unexported (golint)
    • Line 23: warning: exported var PluginMarketplaceInstallCmd should have comment or be unexported (golint)
    • Line 36: warning: exported var PluginMarketplaceListCmd should have comment or be unexported (golint)
    • mmctl/commands/team.go
    • Line 19: warning: exported const APILimitMaximum should have comment or be unexported (golint)
    • Line 21: warning: exported var TeamCmd should have comment or be unexported (golint)
    • Line 26: warning: exported var TeamCreateCmd should have comment or be unexported (golint)
    • Line 35: warning: exported var DeleteTeamsCmd should have comment or be unexported (golint)
    • Line 45: warning: exported var ArchiveTeamsCmd should have comment or be unexported (golint)
    • Line 55: warning: exported var RestoreTeamsCmd should have comment or be unexported (golint)
    • Line 64: warning: exported var ListTeamsCmd should have comment or be unexported (golint)
    • Line 72: warning: exported var SearchTeamCmd should have comment or be unexported (golint)
    • Line 91: warning: exported var ModifyTeamsCmd should have comment or be unexported (golint)
    • mmctl/commands/channel.go
    • Line 19: warning: exported var ChannelCmd should have comment or be unexported (golint)
    • Line 24: warning: exported var ChannelCreateCmd should have comment or be unexported (golint)
    • Line 45: warning: exported var RemoveChannelUsersCmd should have comment or be unexported (golint)
    • Line 55: warning: exported var AddChannelUsersCmd should have comment or be unexported (golint)
    • Line 64: warning: exported var ArchiveChannelsCmd should have comment or be unexported (golint)
    • Line 74: warning: exported var DeleteChannelsCmd should have comment or be unexported (golint)
    • Line 96: warning: exported var ModifyChannelCmd should have comment or be unexported (golint)
    • Line 108: warning: exported var RestoreChannelsCmd should have comment or be unexported (golint)
    • Line 119: warning: exported var UnarchiveChannelCmd should have comment or be unexported (golint)
    • Line 129: warning: exported var MakeChannelPrivateCmd should have comment or be unexported (golint)
    • Line 139: warning: exported var SearchChannelCmd should have comment or be unexported (golint)
    • Line 150: warning: exported var MoveChannelCmd should have comment or be unexported (golint)
    • mmctl/commands/completion.go
    • Line 12: warning: exported var CompletionCmd should have comment or be unexported (golint)
    • Line 17: warning: exported var BashCmd should have comment or be unexported (golint)
    • Line 29: warning: exported var ZshCmd should have comment or be unexported (golint)
    • mmctl/commands/permissions_role.go
    • Line 19: warning: exported var RoleCmd should have comment or be unexported (golint)
    • Line 24: warning: exported var ShowCmd should have comment or be unexported (golint)
    • Line 33: warning: exported var AssignCmd should have comment or be unexported (golint)
    • Line 48: warning: exported var UnassignCmd should have comment or be unexported (golint)
    • mmctl/commands/plugin.go
    • Line 16: warning: exported var PluginCmd should have comment or be unexported (golint)
    • Line 21: warning: exported var PluginAddCmd should have comment or be unexported (golint)
    • Line 30: warning: exported var PluginInstallURLCmd should have comment or be unexported (golint)
    • Line 43: warning: exported var PluginDeleteCmd should have comment or be unexported (golint)
    • Line 52: warning: exported var PluginEnableCmd should have comment or be unexported (golint)
    • Line 61: warning: exported var PluginDisableCmd should have comment or be unexported (golint)
    • Line 70: warning: exported var PluginListCmd should have comment or be unexported (golint)
    • mmctl/commands/roles.go
    • Line 18: warning: exported var RolesCmd should have comment or be unexported (golint)
    • Line 23: warning: exported var RolesSystemAdminCmd should have comment or be unexported (golint)
    • Line 36: warning: exported var RolesMemberCmd should have comment or be unexported (golint)
    • mmctl/commands/root.go
    • Line 18: warning: exported function Run should have comment or be unexported (golint)
    • Line 42: warning: exported var RootCmd should have comment or be unexported (golint)
    • mmctl/commands/import.go
    • Line 20: warning: exported var ImportCmd should have comment or be unexported (golint)
    • Line 25: warning: exported var ImportUploadCmd should have comment or be unexported (golint)
    • Line 33: warning: exported var ImportListCmd should have comment or be unexported (golint)
    • Line 40: warning: exported var ImportListAvailableCmd should have comment or be unexported (golint)
    • Line 48: warning: exported var ImportJobCmd should have comment or be unexported (golint)
    • Line 53: warning: exported var ImportListIncompleteCmd should have comment or be unexported (golint)
    • Line 61: warning: exported var ImportJobListCmd should have comment or be unexported (golint)
    • Line 70: warning: exported var ImportJobShowCmd should have comment or be unexported (golint)
    • Line 78: warning: exported var ImportProcessCmd should have comment or be unexported (golint)
    • mmctl/commands/saml.go
    • Line 17: warning: exported var SamlCmd should have comment or be unexported (golint)
    • Line 22: warning: exported var SamlAuthDataResetCmd should have comment or be unexported (golint)
    • mmctl/commands/channel_users.go
    • Line 15: warning: exported var ChannelUsersCmd should have comment or be unexported (golint)
    • Line 20: warning: exported var ChannelUsersAddCmd should have comment or be unexported (golint)
    • Line 28: warning: exported var ChannelUsersRemoveCmd should have comment or be unexported (golint)
    • mmctl/commands/version.go
    • Line 13: warning: exported var BuildHash should have comment or be unexported (golint)
    • Line 17: warning: exported var VersionCmd should have comment or be unexported (golint)
    • mmctl/commands/post.go
    • Line 19: warning: exported var PostCmd should have comment or be unexported (golint)
    • Line 24: warning: exported var PostCreateCmd should have comment or be unexported (golint)
    • Line 32: warning: exported var PostListCmd should have comment or be unexported (golint)
    • mmctl/commands/team_users.go
    • Line 15: warning: exported var TeamUsersCmd should have comment or be unexported (golint)
    • Line 20: warning: exported var TeamUsersRemoveCmd should have comment or be unexported (golint)
    • Line 29: warning: exported var TeamUsersAddCmd should have comment or be unexported (golint)
    • mmctl/printer/printer.go
    • Line 16: warning: exported const FormatPlain should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Printer should have comment or be unexported (golint)
    • mmctl/commands/bot.go
    • Line 18: warning: exported var BotCmd should have comment or be unexported (golint)
    • Line 23: warning: exported var CreateBotCmd should have comment or be unexported (golint)
    • Line 33: warning: exported var UpdateBotCmd should have comment or be unexported (golint)
    • Line 42: warning: exported var ListBotCmd should have comment or be unexported (golint)
    • Line 51: warning: exported var DisableBotCmd should have comment or be unexported (golint)
    • Line 60: warning: exported var EnableBotCmd should have comment or be unexported (golint)
    • Line 69: warning: exported var AssignBotCmd should have comment or be unexported (golint)
    • mmctl/commands/group.go
    • Line 16: warning: exported var GroupCmd should have comment or be unexported (golint)
    • Line 21: warning: exported var ListLdapGroupsCmd should have comment or be unexported (golint)
    • Line 29: warning: exported var ChannelGroupCmd should have comment or be unexported (golint)
    • Line 34: warning: exported var ChannelGroupEnableCmd should have comment or be unexported (golint)
    • Line 42: warning: exported var ChannelGroupDisableCmd should have comment or be unexported (golint)
    • Line 59: warning: exported var ChannelGroupListCmd should have comment or be unexported (golint)
    • Line 68: warning: exported var TeamGroupCmd should have comment or be unexported (golint)
    • Line 73: warning: exported var TeamGroupEnableCmd should have comment or be unexported (golint)
    • Line 81: warning: exported var TeamGroupDisableCmd should have comment or be unexported (golint)
    • Line 89: warning: exported var TeamGroupStatusCmd should have comment or be unexported (golint)
    • Line 97: warning: exported var TeamGroupListCmd should have comment or be unexported (golint)
    • mmctl/commands/license.go
    • Line 16: warning: exported var LicenseCmd should have comment or be unexported (golint)
    • Line 21: warning: exported var UploadLicenseCmd should have comment or be unexported (golint)
    • Line 29: warning: exported var RemoveLicenseCmd should have comment or be unexported (golint)
    • mmctl/commands/permissions.go
    • Line 17: warning: exported var PermissionsCmd should have comment or be unexported (golint)
    • Line 22: warning: exported var AddPermissionsCmd should have comment or be unexported (golint)
    • Line 32: warning: exported var RemovePermissionsCmd should have comment or be unexported (golint)
    • Line 42: warning: exported var ShowRoleCmd should have comment or be unexported (golint)
    • Line 52: warning: exported var ResetCmd should have comment or be unexported (golint)

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.

    • mmctl/commands/auth.go
    • Line 117: warning: cyclomatic complexity 23 of function loginCmdF() is high (> 15) (gocyclo)
    • Line 304: warning: cyclomatic complexity 17 of function renewCmdF() is high (> 15) (gocyclo)

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!