Preparing report...

Report for github.com/kubernetes-sigs/cluster-api-provider-aws

A+    Excellent!    Found 142 issues across 511 files

Tweet

gofmt87%

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!


gocyclo92%

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.

    • cluster-api-provider-aws/controllers/awsmachine_controller.go
    • Line 455: warning: cyclomatic complexity 30 of function (*AWSMachineReconciler).reconcileNormal() is high (> 15) (gocyclo)
    • Line 313: warning: cyclomatic complexity 19 of function (*AWSMachineReconciler).reconcileDelete() is high (> 15) (gocyclo)
    • Line 120: warning: cyclomatic complexity 17 of function (*AWSMachineReconciler).Reconcile() is high (> 15) (gocyclo)

golint88%

Golint is a linter for Go source code.

    • cluster-api-provider-aws/api/v1alpha4/defaults.go
    • Line 25: warning: don't use underscores in Go names; func SetDefaults_Bastion should be SetDefaultsBastion (golint)
    • Line 33: warning: don't use underscores in Go names; func SetDefaults_NetworkSpec should be SetDefaultsNetworkSpec (golint)
    • Line 56: warning: don't use underscores in Go names; func SetDefaults_Labels should be SetDefaultsLabels (golint)
    • cluster-api-provider-aws/exp/api/v1alpha4/conversion.go
    • Line 35: warning: receiver name r should be consistent with previous receiver name src for AWSMachinePool (golint)
    • Line 48: warning: receiver name r should be consistent with previous receiver name src for AWSMachinePoolList (golint)
    • Line 72: warning: receiver name r should be consistent with previous receiver name src for AWSManagedMachinePool (golint)
    • Line 87: warning: don't use underscores in Go names; func Convert_v1beta1_AWSManagedMachinePoolSpec_To_v1alpha4_AWSManagedMachinePoolSpec should be ConvertV1beta1AWSManagedMachinePoolSpecToV1alpha4AWSManagedMachinePoolSpec (golint)
    • Line 98: warning: receiver name r should be consistent with previous receiver name src for AWSManagedMachinePoolList (golint)
    • Line 111: warning: receiver name r should be consistent with previous receiver name src for AWSFargateProfile (golint)
    • Line 124: warning: receiver name r should be consistent with previous receiver name src for AWSFargateProfileList (golint)
    • Line 131: warning: don't use underscores in Go names; func Convert_v1alpha4_AMIReference_To_v1beta1_AMIReference should be ConvertV1alpha4AMIReferenceToV1beta1AMIReference (golint)
    • Line 136: warning: don't use underscores in Go names; func Convert_v1beta1_AMIReference_To_v1alpha4_AMIReference should be ConvertV1beta1AMIReferenceToV1alpha4AMIReference (golint)
    • Line 141: warning: don't use underscores in Go names; func Convert_v1beta1_Instance_To_v1alpha4_Instance should be ConvertV1beta1InstanceToV1alpha4Instance (golint)
    • Line 146: warning: don't use underscores in Go names; func Convert_v1alpha4_Instance_To_v1beta1_Instance should be ConvertV1alpha4InstanceToV1beta1Instance (golint)
    • cluster-api-provider-aws/cmd/clusterawsadm/api/bootstrap/v1beta1/defaults.go
    • Line 43: warning: don't use underscores in Go names; func SetDefaults_BootstrapUser should be SetDefaultsBootstrapUser (golint)
    • Line 50: warning: don't use underscores in Go names; func SetDefaults_AWSIAMConfigurationSpec should be SetDefaultsAWSIAMConfigurationSpec (golint)
    • Line 97: warning: don't use underscores in Go names; func SetDefaults_AWSIAMConfiguration should be SetDefaultsAWSIAMConfiguration (golint)
    • cluster-api-provider-aws/api/v1alpha3/awsmachine_conversion.go
    • Line 138: warning: don't use underscores in Go names; func Convert_v1beta1_Volume_To_v1alpha3_Volume should be ConvertV1beta1VolumeToV1alpha3Volume (golint)
    • Line 143: warning: don't use underscores in Go names; func Convert_v1beta1_AWSMachineSpec_To_v1alpha3_AWSMachineSpec should be ConvertV1beta1AWSMachineSpecToV1alpha3AWSMachineSpec (golint)
    • Line 148: warning: don't use underscores in Go names; func Convert_v1beta1_Instance_To_v1alpha3_Instance should be ConvertV1beta1InstanceToV1alpha3Instance (golint)
    • Line 173: warning: don't use underscores in Go names; func Convert_v1alpha3_AWSResourceReference_To_v1beta1_AMIReference should be ConvertV1alpha3AWSResourceReferenceToV1beta1AMIReference (golint)
    • Line 179: warning: don't use underscores in Go names; func Convert_v1beta1_AMIReference_To_v1alpha3_AWSResourceReference should be ConvertV1beta1AMIReferenceToV1alpha3AWSResourceReference (golint)
    • Line 224: warning: exported function Convert_v1beta1_AWSMachineTemplateResource_To_v1alpha3_AWSMachineTemplateResource should have comment or be unexported (golint)
    • Line 224: warning: don't use underscores in Go names; func Convert_v1beta1_AWSMachineTemplateResource_To_v1alpha3_AWSMachineTemplateResource should be ConvertV1beta1AWSMachineTemplateResourceToV1alpha3AWSMachineTemplateResource (golint)
    • cluster-api-provider-aws/exp/api/v1alpha3/conversion.go
    • Line 156: warning: don't use underscores in Go names; func Convert_v1alpha3_AWSResourceReference_To_v1beta1_AWSResourceReference should be ConvertV1alpha3AWSResourceReferenceToV1beta1AWSResourceReference (golint)
    • Line 161: warning: don't use underscores in Go names; func Convert_v1beta1_AWSResourceReference_To_v1alpha3_AWSResourceReference should be ConvertV1beta1AWSResourceReferenceToV1alpha3AWSResourceReference (golint)
    • Line 166: warning: don't use underscores in Go names; func Convert_v1beta1_AWSManagedMachinePoolSpec_To_v1alpha3_AWSManagedMachinePoolSpec should be ConvertV1beta1AWSManagedMachinePoolSpecToV1alpha3AWSManagedMachinePoolSpec (golint)
    • Line 171: warning: don't use underscores in Go names; func Convert_v1beta1_Instance_To_v1alpha3_Instance should be ConvertV1beta1InstanceToV1alpha3Instance (golint)
    • Line 176: warning: don't use underscores in Go names; func Convert_v1alpha3_Instance_To_v1beta1_Instance should be ConvertV1alpha3InstanceToV1beta1Instance (golint)
    • Line 180: warning: comment on exported function Convert_v1alpha3_AWSResourceReference_To_v1beta1_AMIReference should be of the form "Convert_v1alpha3_AWSResourceReference_To_v1beta1_AMIReference ..." (golint)
    • Line 181: warning: don't use underscores in Go names; func Convert_v1alpha3_AWSResourceReference_To_v1beta1_AMIReference should be ConvertV1alpha3AWSResourceReferenceToV1beta1AMIReference (golint)
    • Line 185: warning: exported function Convert_v1beta1_AMIReference_To_v1alpha3_AWSResourceReference should have comment or be unexported (golint)
    • Line 185: warning: don't use underscores in Go names; func Convert_v1beta1_AMIReference_To_v1alpha3_AWSResourceReference should be ConvertV1beta1AMIReferenceToV1alpha3AWSResourceReference (golint)
    • Line 190: warning: don't use underscores in Go names; func Convert_v1beta1_Volume_To_v1alpha3_Volume should be ConvertV1beta1VolumeToV1alpha3Volume (golint)
    • Line 195: warning: don't use underscores in Go names; func Convert_v1alpha3_Volume_To_v1beta1_Volume should be ConvertV1alpha3VolumeToV1beta1Volume (golint)
    • cluster-api-provider-aws/controlplane/eks/api/v1alpha4/conversion.go
    • Line 58: warning: don't use underscores in Go names; func Convert_v1alpha4_NetworkStatus_To_v1beta1_NetworkStatus should be ConvertV1alpha4NetworkStatusToV1beta1NetworkStatus (golint)
    • Line 63: warning: don't use underscores in Go names; func Convert_v1beta1_NetworkStatus_To_v1alpha4_NetworkStatus should be ConvertV1beta1NetworkStatusToV1alpha4NetworkStatus (golint)
    • Line 68: warning: don't use underscores in Go names; func Convert_v1alpha4_NetworkSpec_To_v1beta1_NetworkSpec should be ConvertV1alpha4NetworkSpecToV1beta1NetworkSpec (golint)
    • Line 73: warning: don't use underscores in Go names; func Convert_v1beta1_NetworkSpec_To_v1alpha4_NetworkSpec should be ConvertV1beta1NetworkSpecToV1alpha4NetworkSpec (golint)
    • Line 78: warning: don't use underscores in Go names; func Convert_v1alpha4_Bastion_To_v1beta1_Bastion should be ConvertV1alpha4BastionToV1beta1Bastion (golint)
    • Line 83: warning: don't use underscores in Go names; func Convert_v1beta1_Bastion_To_v1alpha4_Bastion should be ConvertV1beta1BastionToV1alpha4Bastion (golint)
    • Line 88: warning: don't use underscores in Go names; func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint should be ConvertV1alpha4APIEndpointToV1beta1APIEndpoint (golint)
    • Line 93: warning: don't use underscores in Go names; func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint should be ConvertV1beta1APIEndpointToV1alpha4APIEndpoint (golint)
    • Line 98: warning: don't use underscores in Go names; func Convert_v1beta1_Instance_To_v1alpha4_Instance should be ConvertV1beta1InstanceToV1alpha4Instance (golint)
    • Line 103: warning: don't use underscores in Go names; func Convert_v1alpha4_Instance_To_v1beta1_Instance should be ConvertV1alpha4InstanceToV1beta1Instance (golint)
    • cluster-api-provider-aws/api/v1alpha4/awscluster_conversion.go
    • Line 58: warning: receiver name r should be consistent with previous receiver name src for AWSCluster (golint)
    • Line 108: warning: exported function Convert_v1beta1_AWSClusterTemplateResource_To_v1alpha4_AWSClusterTemplateResource should have comment or be unexported (golint)
    • Line 108: warning: don't use underscores in Go names; func Convert_v1beta1_AWSClusterTemplateResource_To_v1alpha4_AWSClusterTemplateResource should be ConvertV1beta1AWSClusterTemplateResourceToV1alpha4AWSClusterTemplateResource (golint)
    • Line 113: warning: don't use underscores in Go names; func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint should be ConvertV1alpha4APIEndpointToV1beta1APIEndpoint (golint)
    • Line 118: warning: don't use underscores in Go names; func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint should be ConvertV1beta1APIEndpointToV1alpha4APIEndpoint (golint)
    • Line 130: warning: receiver name r should be consistent with previous receiver name src for AWSClusterList (golint)
    • Line 136: warning: exported function Convert_v1beta1_AWSLoadBalancerSpec_To_v1alpha4_AWSLoadBalancerSpec should have comment or be unexported (golint)
    • Line 136: warning: don't use underscores in Go names; func Convert_v1beta1_AWSLoadBalancerSpec_To_v1alpha4_AWSLoadBalancerSpec should be ConvertV1beta1AWSLoadBalancerSpecToV1alpha4AWSLoadBalancerSpec (golint)
    • cluster-api-provider-aws/pkg/eks/identityprovider/procedures.go
    • Line 30: warning: exported type WaitIdentityProviderAssociatedProcedure should have comment or be unexported (golint)
    • Line 34: warning: exported method WaitIdentityProviderAssociatedProcedure.Name should have comment or be unexported (golint)
    • Line 38: warning: exported method WaitIdentityProviderAssociatedProcedure.Do should have comment or be unexported (golint)
    • Line 64: warning: exported type DisassociateIdentityProviderConfig should have comment or be unexported (golint)
    • Line 68: warning: exported method DisassociateIdentityProviderConfig.Name should have comment or be unexported (golint)
    • Line 72: warning: exported method DisassociateIdentityProviderConfig.Do should have comment or be unexported (golint)
    • Line 94: warning: exported type AssociateIdentityProviderProcedure should have comment or be unexported (golint)
    • Line 98: warning: exported method AssociateIdentityProviderProcedure.Name should have comment or be unexported (golint)
    • Line 102: warning: exported method AssociateIdentityProviderProcedure.Do should have comment or be unexported (golint)
    • Line 130: warning: exported type UpdatedIdentityProviderTagsProcedure should have comment or be unexported (golint)
    • Line 134: warning: exported method UpdatedIdentityProviderTagsProcedure.Name should have comment or be unexported (golint)
    • Line 138: warning: exported method UpdatedIdentityProviderTagsProcedure.Do should have comment or be unexported (golint)
    • Line 152: warning: exported type RemoveIdentityProviderTagsProcedure should have comment or be unexported (golint)
    • Line 156: warning: exported method RemoveIdentityProviderTagsProcedure.Name should have comment or be unexported (golint)
    • Line 160: warning: exported method RemoveIdentityProviderTagsProcedure.Do should have comment or be unexported (golint)
    • cluster-api-provider-aws/api/v1alpha4/conversion.go
    • Line 25: warning: comment on exported function Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta should be of the form "Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta ..." (golint)
    • Line 26: warning: don't use underscores in Go names; func Convert_v1alpha4_ObjectMeta_To_v1beta1_ObjectMeta should be ConvertV1alpha4ObjectMetaToV1beta1ObjectMeta (golint)
    • Line 30: warning: comment on exported function Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta should be of the form "Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta ..." (golint)
    • Line 31: warning: don't use underscores in Go names; func Convert_v1beta1_ObjectMeta_To_v1alpha4_ObjectMeta should be ConvertV1beta1ObjectMetaToV1alpha4ObjectMeta (golint)
    • cluster-api-provider-aws/api/v1beta1/defaults.go
    • Line 1: warning: package comment should be of the form "Package v1beta1 ..." (golint)
    • Line 24: warning: don't use underscores in Go names; func SetDefaults_Bastion should be SetDefaultsBastion (golint)
    • Line 32: warning: don't use underscores in Go names; func SetDefaults_NetworkSpec should be SetDefaultsNetworkSpec (golint)
    • Line 55: warning: don't use underscores in Go names; func SetDefaults_AWSClusterSpec should be SetDefaultsAWSClusterSpec (golint)
    • Line 72: warning: don't use underscores in Go names; func SetDefaults_Labels should be SetDefaultsLabels (golint)
    • cluster-api-provider-aws/api/v1alpha3/awscluster_conversion.go
    • Line 97: warning: don't use underscores in Go names; func Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint should be ConvertV1alpha3APIEndpointToV1beta1APIEndpoint (golint)
    • Line 102: warning: don't use underscores in Go names; func Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint should be ConvertV1beta1APIEndpointToV1alpha3APIEndpoint (golint)
    • Line 106: warning: comment on exported function Convert_v1alpha3_Network_To_v1beta1_NetworkStatus should be of the form "Convert_v1alpha3_Network_To_v1beta1_NetworkStatus ..." (golint)
    • Line 107: warning: don't use underscores in Go names; func Convert_v1alpha3_Network_To_v1beta1_NetworkStatus should be ConvertV1alpha3NetworkToV1beta1NetworkStatus (golint)
    • Line 115: warning: comment on exported function Convert_v1beta1_NetworkStatus_To_v1alpha3_Network should be of the form "Convert_v1beta1_NetworkStatus_To_v1alpha3_Network ..." (golint)
    • Line 116: warning: don't use underscores in Go names; func Convert_v1beta1_NetworkStatus_To_v1alpha3_Network should be ConvertV1beta1NetworkStatusToV1alpha3Network (golint)
    • Line 124: warning: exported function Convert_v1beta1_AWSLoadBalancerSpec_To_v1alpha3_AWSLoadBalancerSpec should have comment or be unexported (golint)
    • Line 124: warning: don't use underscores in Go names; func Convert_v1beta1_AWSLoadBalancerSpec_To_v1alpha3_AWSLoadBalancerSpec should be ConvertV1beta1AWSLoadBalancerSpecToV1alpha3AWSLoadBalancerSpec (golint)
    • cluster-api-provider-aws/api/v1alpha3/awsidentity_conversion.go
    • Line 119: warning: don't use underscores in Go names; func Convert_v1alpha3_AWSClusterStaticIdentitySpec_To_v1beta1_AWSClusterStaticIdentitySpec should be ConvertV1alpha3AWSClusterStaticIdentitySpecToV1beta1AWSClusterStaticIdentitySpec (golint)
    • Line 124: warning: don't use underscores in Go names; func Convert_v1beta1_AWSClusterStaticIdentitySpec_To_v1alpha3_AWSClusterStaticIdentitySpec should be ConvertV1beta1AWSClusterStaticIdentitySpecToV1alpha3AWSClusterStaticIdentitySpec (golint)
    • cluster-api-provider-aws/api/v1alpha4/awsidentity_conversion.go
    • Line 31: warning: receiver name dst should be consistent with previous receiver name src for AWSClusterControllerIdentity (golint)
    • Line 44: warning: receiver name dst should be consistent with previous receiver name src for AWSClusterControllerIdentityList (golint)
    • Line 57: warning: receiver name dst should be consistent with previous receiver name src for AWSClusterRoleIdentity (golint)
    • Line 70: warning: receiver name dst should be consistent with previous receiver name src for AWSClusterRoleIdentityList (golint)
    • Line 83: warning: receiver name dst should be consistent with previous receiver name src for AWSClusterStaticIdentity (golint)
    • Line 96: warning: receiver name dst should be consistent with previous receiver name src for AWSClusterStaticIdentityList (golint)
    • cluster-api-provider-aws/controlplane/eks/api/v1alpha3/conversion.go
    • Line 58: warning: don't use underscores in Go names; func Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint should be ConvertV1alpha3APIEndpointToV1beta1APIEndpoint (golint)
    • Line 63: warning: don't use underscores in Go names; func Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint should be ConvertV1beta1APIEndpointToV1alpha3APIEndpoint (golint)
    • Line 68: warning: don't use underscores in Go names; func Convert_v1alpha3_Bastion_To_v1beta1_Bastion should be ConvertV1alpha3BastionToV1beta1Bastion (golint)
    • Line 73: warning: don't use underscores in Go names; func Convert_v1beta1_Bastion_To_v1alpha3_Bastion should be ConvertV1beta1BastionToV1alpha3Bastion (golint)
    • Line 78: warning: don't use underscores in Go names; func Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec should be ConvertV1alpha3NetworkSpecToV1beta1NetworkSpec (golint)
    • Line 83: warning: don't use underscores in Go names; func Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec should be ConvertV1beta1NetworkSpecToV1alpha3NetworkSpec (golint)
    • Line 88: warning: don't use underscores in Go names; func Convert_v1beta1_Instance_To_v1alpha3_Instance should be ConvertV1beta1InstanceToV1alpha3Instance (golint)
    • Line 93: warning: don't use underscores in Go names; func Convert_v1alpha3_Instance_To_v1beta1_Instance should be ConvertV1alpha3InstanceToV1beta1Instance (golint)
    • Line 98: warning: don't use underscores in Go names; func Convert_v1alpha3_Network_To_v1beta1_NetworkStatus should be ConvertV1alpha3NetworkToV1beta1NetworkStatus (golint)
    • Line 103: warning: don't use underscores in Go names; func Convert_v1beta1_NetworkStatus_To_v1alpha3_Network should be ConvertV1beta1NetworkStatusToV1alpha3Network (golint)
    • Line 107: warning: exported function Convert_v1beta1_AWSManagedControlPlaneSpec_To_v1alpha3_AWSManagedControlPlaneSpec should have comment or be unexported (golint)
    • Line 107: warning: don't use underscores in Go names; func Convert_v1beta1_AWSManagedControlPlaneSpec_To_v1alpha3_AWSManagedControlPlaneSpec should be ConvertV1beta1AWSManagedControlPlaneSpecToV1alpha3AWSManagedControlPlaneSpec (golint)
    • Line 111: warning: exported function Convert_v1beta1_AWSManagedControlPlaneStatus_To_v1alpha3_AWSManagedControlPlaneStatus should have comment or be unexported (golint)
    • Line 111: warning: don't use underscores in Go names; func Convert_v1beta1_AWSManagedControlPlaneStatus_To_v1alpha3_AWSManagedControlPlaneStatus should be ConvertV1beta1AWSManagedControlPlaneStatusToV1alpha3AWSManagedControlPlaneStatus (golint)
    • cluster-api-provider-aws/cmd/clusterawsadm/api/bootstrap/v1alpha1/defaults.go
    • Line 43: warning: don't use underscores in Go names; func SetDefaults_BootstrapUser should be SetDefaultsBootstrapUser (golint)
    • Line 50: warning: don't use underscores in Go names; func SetDefaults_AWSIAMConfigurationSpec should be SetDefaultsAWSIAMConfigurationSpec (golint)
    • Line 97: warning: don't use underscores in Go names; func SetDefaults_AWSIAMConfiguration should be SetDefaultsAWSIAMConfiguration (golint)
    • cluster-api-provider-aws/api/v1alpha4/awsmachine_conversion.go
    • Line 33: warning: receiver name dst should be consistent with previous receiver name src for AWSMachine (golint)
    • Line 46: warning: receiver name dst should be consistent with previous receiver name src for AWSMachineList (golint)
    • Line 94: warning: receiver name dst should be consistent with previous receiver name src for AWSMachineTemplateList (golint)
    • Line 100: warning: exported function Convert_v1beta1_AWSMachineTemplateResource_To_v1alpha4_AWSMachineTemplateResource should have comment or be unexported (golint)
    • Line 100: warning: don't use underscores in Go names; func Convert_v1beta1_AWSMachineTemplateResource_To_v1alpha4_AWSMachineTemplateResource should be ConvertV1beta1AWSMachineTemplateResourceToV1alpha4AWSMachineTemplateResource (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!