Preparing report...

Report for github.com/synfinatic/aws-sso-cli

(v1.3.1)

A+    Excellent!    Found 20 issues across 27 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!


gocyclo96%

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.


golint25%

Golint is a linter for Go source code.

    • aws-sso-cli/sso/cache.go
    • Line 36: warning: comment on exported type Cache should be of the form "Cache ..." (with optional leading article) (golint)
    • Line 45: warning: exported function OpenCache should have comment or be unexported (golint)
    • Line 81: warning: exported method Cache.CacheFile should have comment or be unexported (golint)
    • Line 101: warning: comment on exported method Cache.AddHistory should be of the form "AddHistory ..." (golint)
    • Line 155: warning: comment on exported method Cache.SetRoleExpires should be of the form "SetRoleExpires ..." (golint)
    • Line 166: warning: exported method Cache.MarkRolesExpired should have comment or be unexported (golint)
    • Line 175: warning: exported method Cache.GetRole should have comment or be unexported (golint)
    • Line 183: warning: comment on exported type Roles should be of the form "Roles ..." (with optional leading article) (golint)
    • Line 202: warning: exported type AWSRole should have comment or be unexported (golint)
    • Line 211: warning: comment on exported type AWSRoleFlat should be of the form "AWSRoleFlat ..." (with optional leading article) (golint)
    • Line 231: warning: exported method AWSRoleFlat.GetHeader should have comment or be unexported (golint)
    • Line 236: warning: comment on exported method Cache.NewRoles should be of the form "NewRoles ..." (golint)
    • Line 345: warning: comment on exported method Cache.GetAllTagsSelect should be of the form "GetAllTagsSelect ..." (golint)
    • Line 389: warning: comment on exported method Roles.GetAllRoles should be of the form "GetAllRoles ..." (golint)
    • Line 440: warning: comment on exported method Roles.GetRole should be of the form "GetRole ..." (golint)
    • Line 558: warning: receiver name r should be consistent with previous receiver name f for AWSRoleFlat (golint)
    • Line 567: warning: receiver name r should be consistent with previous receiver name f for AWSRoleFlat (golint)
    • aws-sso-cli/sso/tags_list.go
    • Line 34: warning: exported function NewTagsList should have comment or be unexported (golint)
    • Line 38: warning: comment on exported method TagsList.Add should be of the form "Add ..." (golint)
    • Line 67: warning: comment on exported method TagsList.Get should be of the form "Get ..." (golint)
    • Line 72: 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 86: warning: comment on exported method TagsList.UniqueKeys should be of the form "UniqueKeys ..." (golint)
    • Line 133: warning: comment on exported method TagsList.UniqueValues should be of the form "UniqueValues ..." (golint)
    • aws-sso-cli/utils/utils.go
    • Line 53: warning: comment on exported function HandleUrl should be of the form "HandleUrl ..." (golint)
    • Line 112: warning: comment on exported function MakeRoleARN should be of the form "MakeRoleARN ..." (golint)
    • Line 121: warning: comment on exported function EnsureDirExists should be of the form "EnsureDirExists ..." (golint)
    • Line 142: warning: exported function ParseTimeString should have comment or be unexported (golint)
    • Line 150: warning: comment on exported function TimeRemain should be of the form "TimeRemain ..." (golint)
    • Line 170: warning: comment on exported function AccountIdToString should be of the form "AccountIdToString ..." (golint)
    • aws-sso-cli/cmd/cache_cmd.go
    • Line 27: warning: exported type CacheCmd should have comment or be unexported (golint)
    • Line 29: warning: exported method CacheCmd.Run should have comment or be unexported (golint)
    • aws-sso-cli/cmd/exec_cmd.go
    • Line 37: warning: exported type ExecCmd should have comment or be unexported (golint)
    • Line 50: warning: exported method ExecCmd.Run should have comment or be unexported (golint)
    • Line 107: warning: exported const AwsSsoProfileTemplate should have comment (or a comment on this block) or be unexported (golint)
    • aws-sso-cli/sso/awssso.go
    • Line 38: warning: exported type AWSSSO should have comment or be unexported (golint)
    • Line 53: warning: exported function NewAWSSSO should have comment or be unexported (golint)
    • Line 71: warning: exported method AWSSSO.StoreKey should have comment or be unexported (golint)
    • Line 75: warning: exported method AWSSSO.Authenticate should have comment or be unexported (golint)
    • Line 129: warning: comment on exported const SLOW_DOWN_SEC should be of the form "SLOW_DOWN_SEC ..." (golint)
    • Line 132: warning: exported const RETRY_INTERVAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 135: warning: comment on exported method AWSSSO.RegisterClient should be of the form "RegisterClient ..." (golint)
    • Line 169: warning: comment on exported method AWSSSO.StartDeviceAuthorization should be of the form "StartDeviceAuthorization ..." (golint)
    • Line 196: warning: exported type DeviceAuthInfo should have comment or be unexported (golint)
    • Line 202: warning: exported method AWSSSO.GetDeviceAuthInfo should have comment or be unexported (golint)
    • Line 216: warning: comment on exported method AWSSSO.CreateToken should be of the form "CreateToken ..." (golint)
    • Line 284: warning: exported type RoleInfo should have comment or be unexported (golint)
    • Line 298: warning: exported method RoleInfo.GetHeader should have comment or be unexported (golint)
    • Line 303: warning: exported method RoleInfo.RoleArn should have comment or be unexported (golint)
    • Line 307: warning: exported method AWSSSO.GetRoles should have comment or be unexported (golint)
    • Line 354: warning: exported type AccountInfo should have comment or be unexported (golint)
    • Line 361: warning: exported method AccountInfo.GetHeader should have comment or be unexported (golint)
    • Line 366: warning: exported method AccountInfo.GetAccountId64 should have comment or be unexported (golint)
    • Line 374: warning: exported method AWSSSO.GetAccounts should have comment or be unexported (golint)
    • Line 415: warning: exported method AWSSSO.GetRoleCredentials should have comment or be unexported (golint)
    • Line 443: warning: comment on exported method AWSSSO.GetAllTags should be of the form "GetAllTags ..." (golint)
    • aws-sso-cli/storage/keyring.go
    • Line 35: warning: exported const KEYRING_NAME should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: comment on exported type KeyringStore should be of the form "KeyringStore ..." (with optional leading article) (golint)
    • Line 48: warning: exported var NewPassword should have comment or be unexported (golint)
    • Line 50: warning: exported function NewKeyringConfig should have comment or be unexported (golint)
    • Line 113: warning: exported function OpenKeyring should have comment or be unexported (golint)
    • Line 125: warning: exported method KeyringStore.RegisterClientKey should have comment or be unexported (golint)
    • Line 129: warning: comment on exported method KeyringStore.SaveRegisterClientData should be of the form "SaveRegisterClientData ..." (golint)
    • Line 142: warning: comment on exported method KeyringStore.GetRegisterClientData should be of the form "GetRegisterClientData ..." (golint)
    • Line 155: warning: comment on exported method KeyringStore.DeleteRegisterClientData should be of the form "DeleteRegisterClientData ..." (golint)
    • Line 183: warning: exported method KeyringStore.CreateTokenResponseKey should have comment or be unexported (golint)
    • aws-sso-cli/cmd/complete.go
    • Line 31: warning: exported type Predictor should have comment or be unexported (golint)
    • Line 126: warning: comment on exported method Predictor.RegionComplete should be of the form "RegionComplete ..." (golint)
    • aws-sso-cli/cmd/select.go
    • Line 34: warning: exported type CompleterExec should have comment or be unexported (golint)
    • Line 36: warning: exported type TagsCompleter should have comment or be unexported (golint)
    • Line 45: warning: exported function NewTagsCompleter should have comment or be unexported (golint)
    • Line 60: warning: exported var CompleteSpaceReplace should have comment or be unexported (golint)
    • Line 62: warning: exported method TagsCompleter.Complete should have comment or be unexported (golint)
    • Line 79: warning: exported var NoSpaceAtEnd should have comment or be unexported (golint)
    • Line 81: warning: exported method TagsCompleter.Executor should have comment or be unexported (golint)
    • Line 117: warning: comment on exported method TagsCompleter.ExitChecker should be of the form "ExitChecker ..." (golint)
    • aws-sso-cli/cmd/time_cmd.go
    • Line 28: warning: exported type TimeCmd should have comment or be unexported (golint)
    • Line 30: warning: exported method TimeCmd.Run should have comment or be unexported (golint)
    • aws-sso-cli/storage/storage.go
    • Line 27: warning: comment on exported type RegisterClientData should be of the form "RegisterClientData ..." (with optional leading article) (golint)
    • Line 37: warning: exported method RegisterClientData.Expired should have comment or be unexported (golint)
    • Line 42: warning: exported type StartDeviceAuthData should have comment or be unexported (golint)
    • Line 51: warning: exported type CreateTokenResponse should have comment or be unexported (golint)
    • Line 60: warning: exported method CreateTokenResponse.Expired should have comment or be unexported (golint)
    • Line 65: warning: exported type RoleCredentials should have comment or be unexported (golint)
    • Line 74: warning: exported method RoleCredentials.RoleArn should have comment or be unexported (golint)
    • Line 78: warning: comment on exported method RoleCredentials.ExpireEpoch should be of the form "ExpireEpoch ..." (golint)
    • Line 83: warning: exported method RoleCredentials.ExpireString should have comment or be unexported (golint)
    • Line 88: warning: exported method RoleCredentials.IsExpired should have comment or be unexported (golint)
    • aws-sso-cli/cmd/list_cmd.go
    • Line 47: warning: exported type ListCmd should have comment or be unexported (golint)
    • Line 52: warning: comment on exported method ListCmd.Run should be of the form "Run ..." (golint)
    • Line 123: warning: comment on exported type ConfigFieldNames should be of the form "ConfigFieldNames ..." (with optional leading article) (golint)
    • aws-sso-cli/cmd/renew_cmd.go
    • Line 28: warning: exported type RenewCmd should have comment or be unexported (golint)
    • Line 30: warning: exported method RenewCmd.Run should have comment or be unexported (golint)
    • aws-sso-cli/cmd/tags_cmd.go
    • Line 28: warning: exported type TagsCmd should have comment or be unexported (golint)
    • Line 34: warning: exported method TagsCmd.Run should have comment or be unexported (golint)
    • aws-sso-cli/sso/options.go
    • Line 29: warning: exported type PromptColors should have comment or be unexported (golint)
    • Line 48: warning: exported type ColorOptionFunction should have comment or be unexported (golint)
    • Line 50: warning: exported var PROMPT_COLOR_FUNCS should have comment or be unexported (golint)
    • Line 69: warning: exported var PROMPT_COLORS should have comment or be unexported (golint)
    • Line 91: warning: comment on exported method Settings.DefaultOptions should be of the form "DefaultOptions ..." (golint)
    • Line 104: warning: comment on exported method Settings.GetColorOptions should be of the form "GetColorOptions ..." (golint)
    • aws-sso-cli/sso/role_tags.go
    • Line 28: warning: exported method RoleTags.GetRoleTags should have comment or be unexported (golint)
    • Line 56: warning: comment on exported method RoleTags.GetPossibleUniqueRoles should be of the form "GetPossibleUniqueRoles ..." (golint)
    • Line 121: warning: exported method RoleTags.GetMatchCount should have comment or be unexported (golint)
    • aws-sso-cli/sso/settings.go
    • Line 37: warning: exported const AWS_SESSION_EXPIRATION_FORMAT should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: exported type Settings should have comment or be unexported (golint)
    • Line 61: warning: exported type SSOConfig should have comment or be unexported (golint)
    • Line 69: warning: exported type SSOAccount should have comment or be unexported (golint)
    • Line 77: warning: exported type SSORole should have comment or be unexported (golint)
    • Line 92: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 102: warning: exported var DEFAULT_ACCOUNT_PRIMARY_TAGS should have comment or be unexported (golint)
    • Line 108: warning: exported type OverrideSettings should have comment or be unexported (golint)
    • Line 116: warning: comment on exported function LoadSettings should be of the form "LoadSettings ..." (golint)
    • Line 216: warning: exported method Settings.ConfigFile should have comment or be unexported (golint)
    • Line 220: warning: exported method Settings.CreatedAt should have comment or be unexported (golint)
    • Line 270: warning: receiver name s should be consistent with previous receiver name c for SSOConfig (golint)
    • Line 280: warning: comment on exported method SSOConfig.GetAllTags should be of the form "GetAllTags ..." (golint)
    • Line 281: warning: receiver name s should be consistent with previous receiver name c for SSOConfig (golint)
    • Line 302: warning: receiver name s should be consistent with previous receiver name c for SSOConfig (golint)
    • Line 355: warning: exported method SSORole.SetParentAccount should have comment or be unexported (golint)
    • Line 359: warning: exported method SSOAccount.SetParentConfig should have comment or be unexported (golint)
    • aws-sso-cli/cmd/console_cmd.go
    • Line 37: warning: exported const AWS_FEDERATED_URL should have comment or be unexported (golint)
    • Line 39: warning: exported type ConsoleCmd should have comment or be unexported (golint)
    • Line 51: warning: exported method ConsoleCmd.Run should have comment or be unexported (golint)
    • Line 172: warning: exported type LoginResponse should have comment or be unexported (golint)
    • Line 176: warning: exported type SigninTokenUrlParams should have comment or be unexported (golint)
    • Line 181: warning: exported method SigninTokenUrlParams.GetUrl should have comment or be unexported (golint)
    • Line 186: warning: exported type SessionUrlParams should have comment or be unexported (golint)
    • Line 192: warning: exported method SessionUrlParams.Encode should have comment or be unexported (golint)
    • Line 197: warning: exported type LoginUrlParams should have comment or be unexported (golint)
    • Line 203: warning: exported method LoginUrlParams.GetUrl should have comment or be unexported (golint)
    • aws-sso-cli/cmd/main.go
    • Line 35: warning: comment on exported var Version should be of the form "Version ..." (golint)
    • Line 37: warning: exported var Buildinfos should have comment or be unexported (golint)
    • Line 38: warning: exported var Tag should have comment or be unexported (golint)
    • Line 39: warning: exported var CommitID should have comment or be unexported (golint)
    • Line 40: warning: exported var Delta should have comment or be unexported (golint)
    • Line 42: warning: exported type RunContext should have comment or be unexported (golint)
    • Line 50: warning: exported const CONFIG_DIR should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: exported var DEFAULT_CONFIG should have comment or be unexported (golint)
    • Line 81: warning: exported type CLI should have comment or be unexported (golint)
    • Line 109: warning: don't use underscores in Go names; var run_ctx should be runCtx (golint)
    • Line 202: warning: exported type VersionCmd should have comment or be unexported (golint)
    • Line 204: warning: exported method VersionCmd.Run should have comment or be unexported (golint)
    • Line 215: warning: comment on exported function GetRoleCredentials should be of the form "GetRoleCredentials ..." (golint)
    • Line 259: warning: exported var AwsSSO should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!