Preparing report...

Report for github.com/fidelity/kconnect

A+    Excellent!    Found 87 issues across 142 files

Tweet

gofmt97%

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!


gocyclo97%

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.


golint39%

Golint is a linter for Go source code.

    • kconnect/pkg/rancher/endpoints.go
    • Line 30: warning: exported type EndpointsResolver should have comment or be unexported (golint)
    • Line 36: warning: exported function NewStaticEndpointsResolver should have comment or be unexported (golint)
    • Line 50: warning: exported type StaticEndpointsResolver should have comment or be unexported (golint)
    • Line 54: warning: exported method StaticEndpointsResolver.ActiveDirectoryAuth should have comment or be unexported (golint)
    • Line 58: warning: exported method StaticEndpointsResolver.ClustersList should have comment or be unexported (golint)
    • Line 62: warning: exported method StaticEndpointsResolver.Cluster should have comment or be unexported (golint)
    • kconnect/pkg/errors/validation.go
    • Line 24: warning: exported type ValidationFailed should have comment or be unexported (golint)
    • Line 33: warning: exported method ValidationFailed.Failures should have comment or be unexported (golint)
    • Line 37: warning: exported method ValidationFailed.AddFailure should have comment or be unexported (golint)
    • Line 48: warning: exported function IsValidationFailed should have comment or be unexported (golint)
    • kconnect/pkg/plugins/identity/saml/sp/aws/provider.go
    • Line 49: warning: exported var ErrNoRegion should have comment or be unexported (golint)
    • Line 62: warning: exported function NewServiceProvider should have comment or be unexported (golint)
    • Line 69: warning: exported type ServiceProvider should have comment or be unexported (golint)
    • Line 74: warning: exported method ServiceProvider.PopulateAccount should have comment or be unexported (golint)
    • Line 92: warning: exported method ServiceProvider.ProcessAssertions should have comment or be unexported (golint)
    • Line 326: warning: exported method ServiceProvider.Validate should have comment or be unexported (golint)
    • Line 341: warning: exported method ServiceProvider.ConfigurationItems should have comment or be unexported (golint)
    • kconnect/pkg/app/logout.go
    • Line 32: warning: exported type LogoutInput should have comment or be unexported (golint)
    • Line 42: warning: exported method App.Logout should have comment or be unexported (golint)
    • kconnect/pkg/aws/config.go
    • Line 25: warning: exported const RegionConfigItem should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported function AddRegionConfig should have comment or be unexported (golint)
    • Line 49: warning: exported function AddPartitionConfig should have comment or be unexported (golint)
    • Line 54: warning: exported function AddIAMConfigs should have comment or be unexported (golint)
    • kconnect/pkg/defaults/http.go
    • Line 26: warning: exported type Option should have comment or be unexported (golint)
    • Line 28: warning: exported function Headers should have comment or be unexported (golint)
    • Line 41: warning: exported function WithNoCache should have comment or be unexported (golint)
    • Line 47: warning: exported function WithJSON should have comment or be unexported (golint)
    • Line 54: warning: exported function WithContentTypeJSON should have comment or be unexported (golint)
    • Line 60: warning: exported function WithAcceptJSON should have comment or be unexported (golint)
    • Line 66: warning: exported function WithBearerAuth should have comment or be unexported (golint)
    • kconnect/pkg/azure/identity/client.go
    • Line 41: warning: exported const DefaultTokenDurationMins should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported type AzureADClient should have comment or be unexported (golint)
    • Line 48: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 54: warning: exported method AzureADClient.GetUserRealm should have comment or be unexported (golint)
    • Line 74: warning: exported method AzureADClient.GetMex should have comment or be unexported (golint)
    • Line 92: warning: exported method AzureADClient.GetWsTrustResponse should have comment or be unexported (golint)
    • Line 128: warning: exported method AzureADClient.GetOauth2TokenFromSamlAssertion should have comment or be unexported (golint)
    • Line 156: warning: exported method AzureADClient.GetOauth2TokenFromUsernamePassword should have comment or be unexported (golint)
    • kconnect/pkg/history/filter.go
    • Line 27: warning: exported type FilterSpec should have comment or be unexported (golint)
    • Line 41: warning: exported var DefaultFilterFuncs should have comment or be unexported (golint)
    • Line 52: warning: exported function FilterHistory should have comment or be unexported (golint)
    • Line 56: warning: exported function FilterHistoryWithFuncs should have comment or be unexported (golint)
    • Line 79: warning: exported function FilterEntry should have comment or be unexported (golint)
    • Line 88: warning: exported function ByHistoryID should have comment or be unexported (golint)
    • Line 95: warning: exported function ByProviderID should have comment or be unexported (golint)
    • Line 102: warning: exported function ByAlias should have comment or be unexported (golint)
    • Line 109: warning: exported function ByClusterProvider should have comment or be unexported (golint)
    • Line 116: warning: exported function ByIdentityProvider should have comment or be unexported (golint)
    • Line 123: warning: exported function ByFlags should have comment or be unexported (golint)
    • Line 142: warning: exported function CreateFilterFromMap should have comment or be unexported (golint)
    • kconnect/pkg/http/http_client.go
    • Line 30: warning: exported const MediaTypeJSON should have comment (or a comment on this block) or be unexported (golint)
    • Line 93: warning: exported function SetBasicAuthHeaders should have comment or be unexported (golint)
    • kconnect/pkg/plugins/identity/saml/saml.go
    • Line 40: warning: exported var ErrNoClusterProvider should have comment or be unexported (golint)
    • Line 47: warning: exported const ProviderName should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: exported var ErrRequiresScope should have comment or be unexported (golint)
    • Line 245: warning: exported function ConfigurationItems should have comment or be unexported (golint)
    • kconnect/pkg/azure/id/cluster.go
    • Line 26: warning: exported const ContainerServiceProvider should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported var ErrNotContainerService should have comment or be unexported (golint)
    • kconnect/pkg/aws/identity.go
    • Line 37: warning: exported method Identity.Type should have comment or be unexported (golint)
    • Line 41: warning: exported method Identity.Name should have comment or be unexported (golint)
    • Line 45: warning: exported method Identity.IsExpired should have comment or be unexported (golint)
    • Line 50: warning: exported method Identity.IdentityProviderName should have comment or be unexported (golint)
    • kconnect/pkg/aws/map.go
    • Line 21: warning: exported function MapCredsToIdentity should have comment or be unexported (golint)
    • Line 34: warning: exported function MapIdentityToCreds should have comment or be unexported (golint)
    • kconnect/pkg/azure/wstrust/saml_token_info.go
    • Line 6: warning: exported type SamlAssertionType should have comment or be unexported (golint)
    • Line 9: warning: exported const SamlV1 should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type SamlTokenInfo should have comment or be unexported (golint)
    • kconnect/pkg/provider/discovery/discovery.go
    • Line 35: warning: exported type ProviderCreatorFun should have comment or be unexported (golint)
    • Line 63: warning: exported type GetConfigInput should have comment or be unexported (golint)
    • Line 69: warning: exported type GetConfigOutput should have comment or be unexported (golint)
    • kconnect/pkg/printer/printer.go
    • Line 35: warning: exported type OutputPrinter should have comment or be unexported (golint)
    • Line 38: warning: exported var OutputPrinterYAML should have comment or be unexported (golint)
    • Line 48: warning: exported type ObjectPrinter should have comment or be unexported (golint)
    • Line 52: warning: exported function New should have comment or be unexported (golint)
    • kconnect/pkg/app/to.go
    • Line 38: warning: exported type ConnectToInput should have comment or be unexported (golint)
    • Line 48: warning: exported method App.ConnectTo should have comment or be unexported (golint)
    • kconnect/pkg/config/configset.go
    • Line 26: warning: exported var ErrConfigExistsAlready should have comment or be unexported (golint)
    • Line 48: warning: exported method Item.HasValue should have comment or be unexported (golint)
    • Line 64: warning: exported type ItemType should have comment or be unexported (golint)
    • Line 67: warning: exported var ItemTypeString should have comment or be unexported (golint)
    • Line 72: warning: exported type ConfigurationSet should have comment or be unexported (golint)
    • Line 94: warning: exported function NewConfigurationSet should have comment or be unexported (golint)
    • kconnect/pkg/azure/identity/endpoints.go
    • Line 30: warning: exported const OAuth2Template should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type EndpointsResolver should have comment or be unexported (golint)
    • Line 38: warning: exported function NewOIDCEndpointsResolver should have comment or be unexported (golint)
    • Line 44: warning: exported function NewOAuthEndpointsResolver should have comment or be unexported (golint)
    • kconnect/pkg/azure/wstrust/wstrust_response.go
    • Line 14: warning: exported type Response should have comment or be unexported (golint)
    • Line 18: warning: exported function CreateWsTrustResponse should have comment or be unexported (golint)
    • Line 39: warning: exported method Response.GetSAMLAssertion should have comment or be unexported (golint)
    • kconnect/pkg/provider/registry/registry.go
    • Line 30: warning: exported var ErrDuplicatePlugin should have comment or be unexported (golint)
    • Line 40: warning: exported type PluginRegistration should have comment or be unexported (golint)
    • Line 45: warning: exported type DiscoveryPluginRegistration should have comment or be unexported (golint)
    • Line 51: warning: exported type IdentityPluginRegistration should have comment or be unexported (golint)
    • Line 56: warning: exported function RegisterIdentityPlugin should have comment or be unexported (golint)
    • Line 68: warning: exported function RegisterDiscoveryPlugin should have comment or be unexported (golint)
    • Line 80: warning: exported function GetDiscoveryProvider should have comment or be unexported (golint)
    • Line 91: warning: exported function GetDiscoveryProviderRegistration should have comment or be unexported (golint)
    • Line 103: warning: exported function GetIdentityProvider should have comment or be unexported (golint)
    • Line 114: warning: exported function GetIdentityProviderRegistration should have comment or be unexported (golint)
    • Line 126: warning: exported function ListDiscoveryPluginRegistrations should have comment or be unexported (golint)
    • Line 139: warning: exported function ListIdentityPluginRegistrations should have comment or be unexported (golint)
    • kconnect/pkg/aws/resolve.go
    • Line 30: warning: exported function ResolvePartition should have comment or be unexported (golint)
    • Line 34: warning: exported function ResolveRegion should have comment or be unexported (golint)
    • kconnect/pkg/app/history.go
    • Line 30: warning: exported type HistoryImportInput should have comment or be unexported (golint)
    • Line 36: warning: exported type HistoryExportInput should have comment or be unexported (golint)
    • Line 42: warning: exported type HistoryRemoveInput should have comment or be unexported (golint)
    • Line 49: warning: comment on exported method App.HistoryImport should be of the form "HistoryImport ..." (golint)
    • Line 101: warning: comment on exported method App.HistoryExport should be of the form "HistoryExport ..." (golint)
    • Line 132: warning: exported method App.HistoryRemove should have comment or be unexported (golint)
    • kconnect/pkg/provider/identity/token.go
    • Line 6: warning: exported var ErrNotTokenIdentity should have comment or be unexported (golint)
    • Line 9: warning: exported type TokenIdentity should have comment or be unexported (golint)
    • Line 15: warning: exported function NewTokenIdentity should have comment or be unexported (golint)
    • Line 23: warning: exported method TokenIdentity.Type should have comment or be unexported (golint)
    • Line 27: warning: exported method TokenIdentity.Name should have comment or be unexported (golint)
    • Line 31: warning: exported method TokenIdentity.IsExpired should have comment or be unexported (golint)
    • Line 36: warning: exported method TokenIdentity.IdentityProviderName should have comment or be unexported (golint)
    • Line 40: warning: exported method TokenIdentity.Token should have comment or be unexported (golint)
    • kconnect/pkg/history/time/time.go
    • Line 26: warning: exported function GetExpireTimeFromAWSCredentials should have comment or be unexported (golint)
    • Line 41: warning: exported function GetRemainingTime should have comment or be unexported (golint)
    • kconnect/pkg/app/config.go
    • Line 28: warning: exported const NoInputConfigItem should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type HistoryLocationConfig should have comment or be unexported (golint)
    • Line 38: warning: exported function AddHistoryLocationItems should have comment or be unexported (golint)
    • Line 46: warning: exported type HistoryConfig should have comment or be unexported (golint)
    • Line 53: warning: exported function AddHistoryConfigItems should have comment or be unexported (golint)
    • Line 75: warning: exported type KubernetesConfig should have comment or be unexported (golint)
    • Line 90: warning: exported type CommonConfig should have comment or be unexported (golint)
    • Line 97: warning: exported function AddCommonConfigItems should have comment or be unexported (golint)
    • Line 124: warning: exported type CommonUseConfig should have comment or be unexported (golint)
    • Line 128: warning: exported function AddCommonUseConfigItems should have comment or be unexported (golint)
    • Line 136: warning: exported type HistoryIdentifierConfig should have comment or be unexported (golint)
    • Line 141: warning: exported function AddHistoryIdentifierConfig should have comment or be unexported (golint)
    • Line 153: warning: exported type HistoryQueryConfig should have comment or be unexported (golint)
    • Line 158: warning: exported function AddHistoryQueryConfig should have comment or be unexported (golint)
    • Line 173: warning: exported type HistoryImportConfig should have comment or be unexported (golint)
    • Line 181: warning: exported function AddHistoryImportConfig should have comment or be unexported (golint)
    • Line 203: warning: exported type HistoryExportConfig should have comment or be unexported (golint)
    • Line 209: warning: exported function AddHistoryExportConfig should have comment or be unexported (golint)
    • Line 225: warning: exported type HistoryRemoveConfig should have comment or be unexported (golint)
    • Line 230: warning: exported function AddHistoryRemoveConfig should have comment or be unexported (golint)
    • kconnect/pkg/utils/command.go
    • Line 24: warning: exported function FormatCommand should have comment or be unexported (golint)
    • Line 41: warning: exported function FormatUse should have comment or be unexported (golint)
    • kconnect/pkg/defaults/defaults.go
    • Line 25: warning: exported const RootFolderName should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported function AppDirectory should have comment or be unexported (golint)
    • Line 43: warning: exported function HistoryPath should have comment or be unexported (golint)
    • Line 49: warning: exported function ConfigPath should have comment or be unexported (golint)
    • kconnect/pkg/azure/wstrust/wstrust_mex_document.go
    • Line 26: warning: exported const Trust13Spec should have comment or be unexported (golint)
    • Line 27: warning: exported const Trust2005Spec should have comment or be unexported (golint)
    • Line 29: warning: exported type MexDocument should have comment or be unexported (golint)
    • Line 50: warning: exported function CreateWsTrustMexDocument should have comment or be unexported (golint)
    • kconnect/pkg/azure/identity/types.go
    • Line 26: warning: exported type Client should have comment or be unexported (golint)
    • Line 34: warning: exported type AuthorityConfig should have comment or be unexported (golint)
    • Line 40: warning: exported type AuthenticationConfig should have comment or be unexported (golint)
    • Line 49: warning: exported type Endpoints should have comment or be unexported (golint)
    • Line 65: warning: exported type AADHost should have comment or be unexported (golint)
    • Line 68: warning: exported var AADHostWorldwide should have comment or be unexported (golint)
    • Line 77: warning: exported type AccountType should have comment or be unexported (golint)
    • Line 80: warning: exported var AccountTypeFederated should have comment or be unexported (golint)
    • Line 85: warning: exported type WSTrustResponse should have comment or be unexported (golint)
    • Line 90: warning: exported type WSTrustResponseBody should have comment or be unexported (golint)
    • Line 95: warning: exported type RequestSecurityTokenResponseCollection should have comment or be unexported (golint)
    • Line 100: warning: exported type RequestSecurityTokenResponse should have comment or be unexported (golint)
    • Line 105: warning: exported type RequestedSecurityToken should have comment or be unexported (golint)
    • Line 109: warning: exported type OauthToken should have comment or be unexported (golint)
    • Line 136: warning: exported type EnvelopeParams should have comment or be unexported (golint)
    • kconnect/pkg/utils/prerequisites.go
    • Line 27: warning: exported var ErrorTooLowKubectlVersion should have comment or be unexported (golint)
    • Line 29: warning: exported type KubectlVersion should have comment or be unexported (golint)
    • Line 37: warning: exported function CheckKubectlPrereq should have comment or be unexported (golint)
    • Line 57: warning: exported function CheckAWSIAMAuthPrereq should have comment or be unexported (golint)
    • Line 67: warning: exported function CheckKubeloginPrereq should have comment or be unexported (golint)
    • kconnect/pkg/aws/clients.go
    • Line 35: warning: exported function NewSession should have comment or be unexported (golint)
    • Line 59: warning: exported function NewIAMClient should have comment or be unexported (golint)
    • Line 66: warning: exported function NewEKSClient should have comment or be unexported (golint)
    • kconnect/pkg/app/list.go
    • Line 32: warning: exported type HistoryQueryInput should have comment or be unexported (golint)
    • Line 49: warning: exported method App.QueryHistory should have comment or be unexported (golint)
    • kconnect/pkg/app/app.go
    • Line 86: warning: exported function WithHistoryStore should have comment or be unexported (golint)
    • Line 92: warning: exported function WithLogger should have comment or be unexported (golint)
    • Line 98: warning: exported function WithHTTPClient should have comment or be unexported (golint)
    • Line 104: warning: exported function WithItemSelectorFunc should have comment or be unexported (golint)
    • Line 110: warning: exported function WithSelectClusterFunc should have comment or be unexported (golint)
    • Line 116: warning: exported function WithInteractive should have comment or be unexported (golint)
    • Line 144: warning: exported method App.SetNonInteractive should have comment or be unexported (golint)
    • kconnect/api/v1alpha1/history_types.go
    • Line 50: warning: exported type HistoryEntryStatus should have comment or be unexported (golint)
    • Line 88: warning: exported var ErrNoHistoryExtension should have comment or be unexported (golint)
    • Line 94: warning: exported function NewHistoryEntryList should have comment or be unexported (golint)
    • Line 104: warning: exported function NewHistoryEntry should have comment or be unexported (golint)
    • Line 131: warning: exported function NewHistoryReference should have comment or be unexported (golint)
    • Line 141: warning: exported function GetHistoryReferenceFromContext should have comment or be unexported (golint)
    • Line 158: warning: exported method HistoryEntry.Equals should have comment or be unexported (golint)
    • Line 186: warning: exported method HistoryEntryList.ToTable should have comment or be unexported (golint)
    • kconnect/pkg/flags/flags.go
    • Line 54: warning: exported function CreateCommandFlags should have comment or be unexported (golint)
    • Line 110: warning: exported function PopulateConfigFromFlags should have comment or be unexported (golint)
    • Line 126: warning: exported function PopulateConfigFromCommand should have comment or be unexported (golint)
    • Line 141: warning: exported function BindFlags should have comment or be unexported (golint)
    • Line 170: warning: exported function CopyFlagValue should have comment or be unexported (golint)
    • Line 187: warning: exported function ParseFlagMultiValueToMap should have comment or be unexported (golint)
    • kconnect/api/v1alpha1/register.go
    • Line 30: warning: exported const GroupName should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported var SchemeGroupVersion should have comment or be unexported (golint)
    • Line 58: warning: exported function NewSchemeAndCodecs should have comment or be unexported (golint)
    • kconnect/pkg/azure/identity/identity.go
    • Line 25: warning: exported function NewAuthorizerIdentity should have comment or be unexported (golint)
    • Line 33: warning: exported type AuthorizerIdentity should have comment or be unexported (golint)
    • Line 39: warning: exported method AuthorizerIdentity.Type should have comment or be unexported (golint)
    • Line 43: warning: exported method AuthorizerIdentity.Name should have comment or be unexported (golint)
    • Line 47: warning: exported method AuthorizerIdentity.IsExpired should have comment or be unexported (golint)
    • Line 52: warning: exported method AuthorizerIdentity.Authorizer should have comment or be unexported (golint)
    • Line 56: warning: exported method AuthorizerIdentity.IdentityProviderName should have comment or be unexported (golint)
    • Line 60: warning: exported function NewActiveDirectoryIdentity should have comment or be unexported (golint)
    • Line 70: warning: exported type ActiveDirectoryIdentity should have comment or be unexported (golint)
    • Line 78: warning: exported method ActiveDirectoryIdentity.Type should have comment or be unexported (golint)
    • Line 82: warning: exported method ActiveDirectoryIdentity.Name should have comment or be unexported (golint)
    • Line 86: warning: exported method ActiveDirectoryIdentity.IsExpired should have comment or be unexported (golint)
    • Line 91: warning: exported method ActiveDirectoryIdentity.IdentityProviderName should have comment or be unexported (golint)
    • Line 95: warning: exported method ActiveDirectoryIdentity.GetOAuthToken should have comment or be unexported (golint)
    • Line 142: warning: exported method ActiveDirectoryIdentity.Clone should have comment or be unexported (golint)
    • Line 181: warning: comment on exported type CloneOption should be of the form "CloneOption ..." (with optional leading article) (golint)
    • Line 184: warning: exported function WithClientID should have comment or be unexported (golint)
    • kconnect/pkg/azure/wstrust/wstrust_endpoint.go
    • Line 15: warning: exported type EndpointVersion should have comment or be unexported (golint)
    • Line 18: warning: exported const Trust2005 should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported type Endpoint should have comment or be unexported (golint)
    • Line 200: warning: exported method Endpoint.BuildTokenRequestMessageWIA should have comment or be unexported (golint)
    • Line 204: warning: exported method Endpoint.BuildTokenRequestMessageUsernamePassword should have comment or be unexported (golint)
    • kconnect/pkg/config/configuration.go
    • Line 38: warning: exported type AppConfiguration should have comment or be unexported (golint)
    • Line 44: warning: exported function NewAppConfiguration should have comment or be unexported (golint)
    • Line 50: warning: exported function NewAppConfigurationWithPath should have comment or be unexported (golint)
    • Line 88: warning: exported function GetValue should have comment or be unexported (golint)
    • kconnect/pkg/provider/identity/identity.go
    • Line 19: warning: exported type ProviderCreatorFun should have comment or be unexported (golint)
    • Line 21: warning: exported type AuthenticateInput should have comment or be unexported (golint)
    • Line 25: warning: exported type AuthenticateOutput 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!