Preparing report...

Report for go.bytebuilders.dev/resource-model

A+    Excellent!    Found 71 issues across 184 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!


gocyclo99%

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.


golint61%

Golint is a linter for Go source code.

    • /go.bytebuilders.dev/resource-model/apis/cluster/v1alpha1/cluster_auth_info_template_helpers.go
    • Line 29: warning: exported method ClusterAuthInfoTemplate.CustomResourceDefinition should have comment or be unexported (golint)
    • Line 29: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 33: warning: exported method ClusterAuthInfoTemplate.SetLabels should have comment or be unexported (golint)
    • Line 42: warning: exported method ClusterAuthInfoTemplate.FormatLabels should have comment or be unexported (golint)
    • Line 42: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /go.bytebuilders.dev/resource-model/apis/cluster/v1alpha1/cluster_user_auth_types.go
    • Line 24: warning: exported const ResourceKindClusterUserAuth should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type TokenProviderName should have comment or be unexported (golint)
    • Line 32: warning: exported const TokenProviderGoogle should have comment (or a comment on this block) or be unexported (golint)
    • Line 41: warning: comment on exported type ClusterUserAuth should be of the form "ClusterUserAuth ..." (with optional leading article) (golint)
    • Line 51: warning: exported type ClusterUserAuthSpec should have comment or be unexported (golint)
    • Line 92: warning: exported type GoogleOAuthProvider should have comment or be unexported (golint)
    • Line 102: warning: exported type AWSProvider should have comment or be unexported (golint)
    • Line 125: warning: exported type ClusterUserAuthList should have comment or be unexported (golint)
    • Line 131: warning: exported type ClusterUserAuthStatus should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/linode/linode.go
    • Line 31: warning: exported type Client should have comment or be unexported (golint)
    • Line 35: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 51: warning: exported method Client.GetName should have comment or be unexported (golint)
    • Line 55: warning: comment on exported method Client.ListRegions should be of the form "ListRegions ..." (golint)
    • Line 69: warning: comment on exported method Client.ListZones should be of the form "ListZones ..." (golint)
    • Line 82: warning: exported method Client.ListMachineTypes should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/util/util.go
    • Line 35: warning: exported function QuantityP should have comment or be unexported (golint)
    • Line 39: warning: exported function Sanitize should have comment or be unexported (golint)
    • Line 43: warning: exported function ReadFile should have comment or be unexported (golint)
    • Line 51: warning: exported function WriteFile should have comment or be unexported (golint)
    • Line 59: warning: exported function MBToGB should have comment or be unexported (golint)
    • Line 64: warning: comment on exported function GetDataFormFile should be of the form "GetDataFormFile ..." (golint)
    • Line 83: warning: exported function SortCloudProvider should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/aws/aws.go
    • Line 35: warning: exported type Client should have comment or be unexported (golint)
    • Line 39: warning: exported type Ec2Instance should have comment or be unexported (golint)
    • Line 47: warning: exported type Ec2Storage should have comment or be unexported (golint)
    • Line 57: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 67: warning: exported method Client.GetName should have comment or be unexported (golint)
    • Line 71: warning: exported method Client.ListRegions should have comment or be unexported (golint)
    • Line 106: warning: exported method Client.ListZones should have comment or be unexported (golint)
    • Line 124: warning: comment on exported method Client.ListMachineTypes should be of the form "ListMachineTypes ..." (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/gce/util.go
    • Line 33: warning: exported function ParseRegion should have comment or be unexported (golint)
    • Line 48: warning: exported function ParseZoneFromUrl should have comment or be unexported (golint)
    • Line 56: warning: exported function ParseMachine should have comment or be unexported (golint)
    • Line 75: warning: comment on exported function ParseCategoryFromSKU should be of the form "ParseCategoryFromSKU ..." (golint)
    • Line 80: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • /go.bytebuilders.dev/resource-model/apis/cluster/v1alpha1/cluster_auth_info_template_types.go
    • Line 27: warning: exported const ResourceKindClusterAuthInfoTemplate should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: comment on exported type ClusterAuthInfoTemplate should be of the form "ClusterAuthInfoTemplate ..." (with optional leading article) (golint)
    • Line 47: warning: exported type ClusterAuthInfoTemplateSpec should have comment or be unexported (golint)
    • Line 93: warning: exported method AuthProviderConfig.APIFormat should have comment or be unexported (golint)
    • Line 104: warning: exported function ToAuthProviderConfig should have comment or be unexported (golint)
    • Line 127: warning: exported type ClusterAuthInfoTemplateList should have comment or be unexported (golint)
    • Line 133: warning: exported type ClusterAuthInfoTemplateStatus should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/apis/cluster/v1alpha1/cluster_info_types.go
    • Line 24: warning: exported const ResourceKindClusterInfo should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: comment on exported type ProviderName should be of the form "ProviderName ..." (with optional leading article) (golint)
    • Line 33: warning: exported const ProviderAKS should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: comment on exported type ClusterInfo should be of the form "ClusterInfo ..." (with optional leading article) (golint)
    • Line 58: warning: exported type ClusterInfoSpec should have comment or be unexported (golint)
    • Line 85: warning: exported type ClusterPhase should have comment or be unexported (golint)
    • Line 88: warning: exported const ClusterPhaseConnected should have comment (or a comment on this block) or be unexported (golint)
    • Line 96: warning: exported type ClusterInfoList should have comment or be unexported (golint)
    • Line 102: warning: exported type ClusterInfoStatus should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/apis/cluster/v1alpha1/cluster_user_auth_helpers.go
    • Line 29: warning: exported method ClusterUserAuth.CustomResourceDefinition should have comment or be unexported (golint)
    • Line 29: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 33: warning: exported method ClusterUserAuth.SetLabels should have comment or be unexported (golint)
    • Line 43: warning: exported method ClusterUserAuth.FormatLabels should have comment or be unexported (golint)
    • Line 43: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/packet/util.go
    • Line 34: warning: exported var NumOfCore should have comment or be unexported (golint)
    • Line 49: warning: exported function ParseFacility should have comment or be unexported (golint)
    • Line 59: warning: exported function ParsePlan should have comment or be unexported (golint)
    • Line 95: warning: comment on exported function GetFacilityIdFromHerf should be of the form "GetFacilityIdFromHerf ..." (golint)
    • Line 101: warning: exported function GetCpuCore should have comment or be unexported (golint)
    • Line 104: 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 109: warning: comment on exported function RemoveUnitRetFloat64 should be of the form "RemoveUnitRetFloat64 ..." (golint)
    • Line 124: warning: exported function RemoveUnitRetInt should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/cmds/options/kubernetes_data.go
    • Line 26: warning: exported const AllProvider should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type KubernetesData should have comment or be unexported (golint)
    • Line 36: warning: exported function NewKubernetesData should have comment or be unexported (golint)
    • Line 42: warning: exported method KubernetesData.AddFlags should have comment or be unexported (golint)
    • Line 49: warning: exported method KubernetesData.ValidateFlags should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/credential/vultr.go
    • Line 26: warning: exported type Vultr should have comment or be unexported (golint)
    • Line 30: warning: exported method Vultr.AddFlags should have comment or be unexported (golint)
    • Line 34: warning: exported method Vultr.RequiredFlags should have comment or be unexported (golint)
    • Line 34: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /go.bytebuilders.dev/resource-model/apis/identity/v1alpha1/team_types.go
    • Line 24: warning: exported const ResourceKindTeam should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type AccessMode should have comment or be unexported (golint)
    • Line 32: warning: exported const AccessModeNone should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: comment on exported type TeamTag should be of the form "TeamTag ..." (with optional leading article) (golint)
    • Line 43: warning: exported const TeamTagDev should have comment (or a comment on this block) or be unexported (golint)
    • Line 49: warning: exported const OwnerTeamName should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: comment on exported type Team should be of the form "Team ..." (with optional leading article) (golint)
    • Line 67: warning: exported type TeamSpec should have comment or be unexported (golint)
    • Line 85: warning: exported type TeamList should have comment or be unexported (golint)
    • Line 91: warning: exported type TeamStatus should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/packet/packet.go
    • Line 31: warning: exported type Client should have comment or be unexported (golint)
    • Line 37: warning: exported type PlanList should have comment or be unexported (golint)
    • Line 41: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 53: warning: exported method Client.GetName should have comment or be unexported (golint)
    • Line 57: warning: exported method Client.ListRegions should have comment or be unexported (golint)
    • Line 70: warning: comment on exported method Client.ListZones should be of the form "ListZones ..." (golint)
    • Line 83: warning: exported method Client.ListMachineTypes should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/apis/cloud/v1alpha1/credential_types.go
    • Line 24: warning: exported const ResourceKindCredential should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: comment on exported type CredentialType should be of the form "CredentialType ..." (with optional leading article) (golint)
    • Line 33: warning: exported const CredentialTypeAWS should have comment (or a comment on this block) or be unexported (golint)
    • Line 50: warning: comment on exported type Credential should be of the form "Credential ..." (with optional leading article) (golint)
    • Line 60: warning: exported type CredentialSpec should have comment or be unexported (golint)
    • Line 89: warning: exported type GoogleOAuthCredential should have comment or be unexported (golint)
    • Line 101: warning: exported type GoogleCloudCredential should have comment or be unexported (golint)
    • Line 106: warning: exported type DigitalOceanCredential should have comment or be unexported (golint)
    • Line 110: warning: exported type AzureCredential should have comment or be unexported (golint)
    • Line 117: warning: exported type AzureStorageCredential should have comment or be unexported (golint)
    • Line 122: warning: exported type AWSCredential should have comment or be unexported (golint)
    • Line 127: warning: exported type PacketCredential should have comment or be unexported (golint)
    • Line 132: warning: exported type ScalewayCredential should have comment or be unexported (golint)
    • Line 137: warning: exported type LinodeCredential should have comment or be unexported (golint)
    • Line 141: warning: exported type VultrCredential should have comment or be unexported (golint)
    • Line 145: warning: exported type SwiftCredential should have comment or be unexported (golint)
    • Line 156: warning: comment on exported type CredentialList should be of the form "CredentialList ..." (with optional leading article) (golint)
    • Line 164: warning: exported type CredentialStatus should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/apis/cluster/v1alpha1/cluster_info_helpers.go
    • Line 29: warning: exported method ClusterInfo.CustomResourceDefinition should have comment or be unexported (golint)
    • Line 29: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 33: warning: exported method ClusterInfo.SetLabels should have comment or be unexported (golint)
    • Line 43: warning: exported method ClusterInfo.FormatLabels should have comment or be unexported (golint)
    • Line 43: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/scaleway/scaleway.go
    • Line 27: warning: exported type Client should have comment or be unexported (golint)
    • Line 32: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 46: warning: exported method Client.GetName should have comment or be unexported (golint)
    • Line 50: warning: exported method Client.ListRegions should have comment or be unexported (golint)
    • Line 66: warning: exported method Client.ListZones should have comment or be unexported (golint)
    • Line 74: warning: exported method Client.ListMachineTypes should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/credential/gce.go
    • Line 27: warning: exported type GCE should have comment or be unexported (golint)
    • Line 33: warning: exported method GCE.ServiceAccountJson should have comment or be unexported (golint)
    • Line 45: warning: exported method GCE.AddFlags should have comment or be unexported (golint)
    • Line 50: warning: exported method GCE.RequiredFlags should have comment or be unexported (golint)
    • Line 50: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/gce/gce.go
    • Line 30: warning: exported type Client should have comment or be unexported (golint)
    • Line 36: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 49: warning: exported method Client.GetName should have comment or be unexported (golint)
    • Line 53: warning: exported method Client.ListRegions should have comment or be unexported (golint)
    • Line 74: warning: exported method Client.ListZones should have comment or be unexported (golint)
    • Line 90: warning: exported method Client.ListMachineTypes should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/apis/identity/v1alpha1/org_user_types.go
    • Line 24: warning: exported const ResourceKindOrgUser should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported type OrgUser should be of the form "OrgUser ..." (with optional leading article) (golint)
    • Line 44: warning: exported type OrgUserSpec should have comment or be unexported (golint)
    • Line 65: warning: exported type OrgUserList should have comment or be unexported (golint)
    • Line 71: warning: exported type OrgUserStatus should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/credential/linode.go
    • Line 26: warning: exported type Linode should have comment or be unexported (golint)
    • Line 30: warning: exported method Linode.AddFlags should have comment or be unexported (golint)
    • Line 34: warning: exported method Linode.RequiredFlags should have comment or be unexported (golint)
    • Line 34: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /go.bytebuilders.dev/resource-model/pkg/credential/scaleway.go
    • Line 26: warning: exported type Scaleway should have comment or be unexported (golint)
    • Line 30: warning: exported method Scaleway.AddFlags should have comment or be unexported (golint)
    • Line 35: warning: exported method Scaleway.RequiredFlags should have comment or be unexported (golint)
    • Line 35: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/providers.go
    • Line 56: warning: exported function List should have comment or be unexported (golint)
    • Line 60: warning: exported type Interface should have comment or be unexported (golint)
    • Line 67: warning: exported function NewCloudProvider should have comment or be unexported (golint)
    • Line 89: warning: comment on exported function GetCloudProvider should be of the form "GetCloudProvider ..." (golint)
    • Line 109: warning: exported function WriteObject should have comment or be unexported (golint)
    • Line 144: warning: exported function WriteCloudProvider should have comment or be unexported (golint)
    • Line 160: warning: comment on exported function MergeCloudProvider should be of the form "MergeCloudProvider ..." (golint)
    • Line 247: warning: comment on exported function MergeAndWriteCloudProvider should be of the form "MergeAndWriteCloudProvider ..." (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/digitalocean/digitalocean.go
    • Line 30: warning: exported type Client should have comment or be unexported (golint)
    • Line 35: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 41: warning: exported method Client.GetName should have comment or be unexported (golint)
    • Line 45: warning: exported method Client.ListRegions should have comment or be unexported (golint)
    • Line 58: warning: comment on exported method Client.ListZones should be of the form "ListZones ..." (golint)
    • Line 71: warning: exported method Client.ListMachineTypes should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/apis/identity/v1alpha1/team_user_types.go
    • Line 24: warning: exported const ResourceKindTeamUser should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported type TeamUser should be of the form "TeamUser ..." (with optional leading article) (golint)
    • Line 44: warning: exported type TeamUserSpec should have comment or be unexported (golint)
    • Line 66: warning: exported type TeamUserList should have comment or be unexported (golint)
    • Line 72: warning: exported type TeamUserStatus should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/options.go
    • Line 32: warning: exported type Options should have comment or be unexported (golint)
    • Line 44: warning: exported function NewOptions should have comment or be unexported (golint)
    • Line 50: warning: exported function NewOptionsForCredential should have comment or be unexported (golint)
    • Line 77: warning: exported method Options.AddFlags should have comment or be unexported (golint)
    • Line 89: warning: exported method Options.ValidateFlags should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/azure/azure.go
    • Line 34: warning: exported type Client should have comment or be unexported (golint)
    • Line 40: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 64: warning: exported method Client.GetName should have comment or be unexported (golint)
    • Line 68: warning: exported method Client.ListRegions should have comment or be unexported (golint)
    • Line 81: warning: exported method Client.ListZones should have comment or be unexported (golint)
    • Line 99: warning: exported method Client.ListMachineTypes should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/credential/packet.go
    • Line 26: warning: exported type Packet should have comment or be unexported (golint)
    • Line 30: warning: exported method Packet.AddFlags should have comment or be unexported (golint)
    • Line 35: warning: exported method Packet.RequiredFlags should have comment or be unexported (golint)
    • Line 35: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /go.bytebuilders.dev/resource-model/apis/cloud/v1alpha1/credential_helpers.go
    • Line 29: warning: exported method Credential.CustomResourceDefinition should have comment or be unexported (golint)
    • Line 29: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • Line 33: warning: exported method Credential.SetLabels should have comment or be unexported (golint)
    • Line 42: warning: exported method Credential.FormatLabels should have comment or be unexported (golint)
    • Line 42: warning: receiver name should not be an underscore, omit the name if it is unused (golint)
    • /go.bytebuilders.dev/resource-model/apis/ui/v1alpha1/optionseditor_types.go
    • Line 24: warning: exported const ResourceKindOptionsEditor should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: comment on exported type OptionsEditor should be of the form "OptionsEditor ..." (with optional leading article) (golint)
    • Line 44: warning: exported type OptionsEditorSpec should have comment or be unexported (golint)
    • Line 71: warning: exported const ClusterScoped should have comment (or a comment on this block) or be unexported (golint)
    • Line 85: warning: exported type OptionsEditorList should have comment or be unexported (golint)
    • Line 91: warning: exported type OptionsEditorStatus should have comment or be unexported (golint)
    • /go.bytebuilders.dev/resource-model/pkg/providers/vultr/vultr.go
    • Line 31: warning: exported type Client should have comment or be unexported (golint)
    • Line 35: warning: exported type PlanExtended should have comment or be unexported (golint)
    • Line 41: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 48: warning: exported method Client.GetName should have comment or be unexported (golint)
    • Line 52: warning: exported method Client.ListRegions should have comment or be unexported (golint)
    • Line 65: warning: exported method Client.ListZones should have comment or be unexported (golint)
    • Line 78: warning: exported method Client.ListMachineTypes 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!