Preparing report...

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

A+    Excellent!    Found 107 issues across 432 files

Tweet

gofmt92%

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!


golint86%

Golint is a linter for Go source code.

    • cluster-api-provider-azure/api/v1alpha3/azureclusteridentity_conversion.go
    • Line 29: warning: exported const AzureClusterKind should have comment (or a comment on this block) or be unexported (golint)
    • Line 76: warning: receiver name dst should be consistent with previous receiver name src for AzureClusterIdentity (golint)
    • Line 96: warning: comment on exported function Convert_v1alpha3_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec should be of the form "Convert_v1alpha3_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec ..." (golint)
    • Line 97: warning: don't use underscores in Go names; func Convert_v1alpha3_AzureClusterIdentitySpec_To_v1beta1_AzureClusterIdentitySpec should be ConvertV1alpha3AzureClusterIdentitySpecToV1beta1AzureClusterIdentitySpec (golint)
    • Line 105: warning: comment on exported function Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha3_AzureClusterIdentitySpec should be of the form "Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha3_AzureClusterIdentitySpec ..." (golint)
    • Line 106: warning: don't use underscores in Go names; func Convert_v1beta1_AzureClusterIdentitySpec_To_v1alpha3_AzureClusterIdentitySpec should be ConvertV1beta1AzureClusterIdentitySpecToV1alpha3AzureClusterIdentitySpec (golint)
    • cluster-api-provider-azure/internal/test/logentries/pause_events.go
    • Line 24: warning: exported type EntryCriteria should have comment or be unexported (golint)
    • Line 32: warning: exported function GenerateCreateNotPausedLogEntries should have comment or be unexported (golint)
    • Line 77: warning: exported function GenerateUpdatePausedClusterLogEntries should have comment or be unexported (golint)
    • Line 122: warning: exported function GenerateUpdateUnpausedClusterLogEntries should have comment or be unexported (golint)
    • cluster-api-provider-azure/pkg/cloudtest/cloudtest.go
    • Line 46: warning: exported method Log.V should have comment or be unexported (golint)
    • Line 47: warning: exported method Log.WithValues should have comment or be unexported (golint)
    • Line 48: warning: exported method Log.WithName should have comment or be unexported (golint)
    • Line 49: warning: exported method Log.Info should have comment or be unexported (golint)
    • Line 50: warning: exported method Log.Enabled should have comment or be unexported (golint)
    • cluster-api-provider-azure/api/v1alpha3/azuremachine_conversion.go
    • Line 62: warning: receiver name dst should be consistent with previous receiver name src for AzureMachine (golint)
    • Line 83: warning: receiver name dst should be consistent with previous receiver name src for AzureMachineList (golint)
    • Line 88: warning: exported function Convert_v1alpha3_AzureMachineSpec_To_v1beta1_AzureMachineSpec should have comment or be unexported (golint)
    • Line 88: warning: don't use underscores in Go names; func Convert_v1alpha3_AzureMachineSpec_To_v1beta1_AzureMachineSpec should be ConvertV1alpha3AzureMachineSpecToV1beta1AzureMachineSpec (golint)
    • Line 97: warning: don't use underscores in Go names; func Convert_v1beta1_AzureMachineSpec_To_v1alpha3_AzureMachineSpec should be ConvertV1beta1AzureMachineSpecToV1alpha3AzureMachineSpec (golint)
    • Line 106: warning: don't use underscores in Go names; func Convert_v1alpha3_AzureMachineStatus_To_v1beta1_AzureMachineStatus should be ConvertV1alpha3AzureMachineStatusToV1beta1AzureMachineStatus (golint)
    • Line 115: warning: don't use underscores in Go names; func Convert_v1beta1_AzureMachineStatus_To_v1alpha3_AzureMachineStatus should be ConvertV1beta1AzureMachineStatusToV1alpha3AzureMachineStatus (golint)
    • Line 124: warning: don't use underscores in Go names; func Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk should be ConvertV1alpha3OSDiskToV1beta1OSDisk (golint)
    • Line 141: warning: don't use underscores in Go names; func Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk should be ConvertV1beta1OSDiskToV1alpha3OSDisk (golint)
    • Line 160: warning: don't use underscores in Go names; func Convert_v1alpha3_ManagedDisk_To_v1beta1_ManagedDiskParameters should be ConvertV1alpha3ManagedDiskToV1beta1ManagedDiskParameters (golint)
    • Line 167: warning: don't use underscores in Go names; func Convert_v1beta1_ManagedDiskParameters_To_v1alpha3_ManagedDisk should be ConvertV1beta1ManagedDiskParametersToV1alpha3ManagedDisk (golint)
    • cluster-api-provider-azure/exp/api/v1alpha3/azuremachinepool_conversion.go
    • Line 90: warning: receiver name dst should be consistent with previous receiver name src for AzureMachinePool (golint)
    • Line 105: warning: exported function Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha3_AzureMachinePoolMachineTemplate should have comment or be unexported (golint)
    • Line 105: warning: don't use underscores in Go names; func Convert_v1beta1_AzureMachinePoolMachineTemplate_To_v1alpha3_AzureMachinePoolMachineTemplate should be ConvertV1beta1AzureMachinePoolMachineTemplateToV1alpha3AzureMachinePoolMachineTemplate (golint)
    • Line 109: warning: exported function Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha3_AzureMachinePoolSpec should have comment or be unexported (golint)
    • Line 109: warning: don't use underscores in Go names; func Convert_v1beta1_AzureMachinePoolSpec_To_v1alpha3_AzureMachinePoolSpec should be ConvertV1beta1AzureMachinePoolSpecToV1alpha3AzureMachinePoolSpec (golint)
    • Line 113: warning: exported function Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha3_AzureMachinePoolStatus should have comment or be unexported (golint)
    • Line 113: warning: don't use underscores in Go names; func Convert_v1beta1_AzureMachinePoolStatus_To_v1alpha3_AzureMachinePoolStatus should be ConvertV1beta1AzureMachinePoolStatusToV1alpha3AzureMachinePoolStatus (golint)
    • Line 125: warning: exported function Convert_v1alpha3_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus should have comment or be unexported (golint)
    • Line 125: warning: don't use underscores in Go names; func Convert_v1alpha3_AzureMachinePoolStatus_To_v1beta1_AzureMachinePoolStatus should be ConvertV1alpha3AzureMachinePoolStatusToV1beta1AzureMachinePoolStatus (golint)
    • cluster-api-provider-azure/exp/api/v1alpha4/conversion.go
    • Line 28: warning: don't use underscores in Go names; func Convert_v1alpha4_OSDisk_To_v1beta1_OSDisk should be ConvertV1alpha4OSDiskToV1beta1OSDisk (golint)
    • Line 33: warning: don't use underscores in Go names; func Convert_v1beta1_OSDisk_To_v1alpha4_OSDisk should be ConvertV1beta1OSDiskToV1alpha4OSDisk (golint)
    • Line 38: warning: don't use underscores in Go names; func Convert_v1alpha4_Image_To_v1beta1_Image should be ConvertV1alpha4ImageToV1beta1Image (golint)
    • Line 43: warning: don't use underscores in Go names; func Convert_v1beta1_Image_To_v1alpha4_Image should be ConvertV1beta1ImageToV1alpha4Image (golint)
    • Line 48: warning: don't use underscores in Go names; func Convert_v1alpha4_APIEndpoint_To_v1beta1_APIEndpoint should be ConvertV1alpha4APIEndpointToV1beta1APIEndpoint (golint)
    • Line 53: warning: don't use underscores in Go names; func Convert_v1beta1_APIEndpoint_To_v1alpha4_APIEndpoint should be ConvertV1beta1APIEndpointToV1alpha4APIEndpoint (golint)
    • cluster-api-provider-azure/api/v1alpha3/azuremachinetemplate_conversion.go
    • Line 62: warning: receiver name dst should be consistent with previous receiver name src for AzureMachineTemplate (golint)
    • Line 83: warning: receiver name dst should be consistent with previous receiver name src for AzureMachineTemplateList (golint)
    • Line 88: warning: exported function Convert_v1beta1_AzureSharedGalleryImage_To_v1alpha3_AzureSharedGalleryImage should have comment or be unexported (golint)
    • Line 88: warning: don't use underscores in Go names; func Convert_v1beta1_AzureSharedGalleryImage_To_v1alpha3_AzureSharedGalleryImage should be ConvertV1beta1AzureSharedGalleryImageToV1alpha3AzureSharedGalleryImage (golint)
    • Line 96: warning: exported function Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha3_AzureMachineTemplateResource should have comment or be unexported (golint)
    • Line 96: warning: don't use underscores in Go names; func Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha3_AzureMachineTemplateResource should be ConvertV1beta1AzureMachineTemplateResourceToV1alpha3AzureMachineTemplateResource (golint)
    • cluster-api-provider-azure/internal/test/record/logger.go
    • Line 90: warning: exported type Listener should have comment or be unexported (golint)
    • Line 97: warning: exported function NewListener should have comment or be unexported (golint)
    • Line 103: warning: exported method Listener.Listen should have comment or be unexported (golint)
    • Line 107: warning: exported method Listener.GetEntries should have comment or be unexported (golint)
    • cluster-api-provider-azure/api/v1alpha3/azurecluster_conversion.go
    • Line 105: warning: receiver name dst should be consistent with previous receiver name src for AzureCluster (golint)
    • Line 133: warning: receiver name dst should be consistent with previous receiver name src for AzureClusterList (golint)
    • Line 139: warning: don't use underscores in Go names; func Convert_v1alpha3_AzureClusterStatus_To_v1beta1_AzureClusterStatus should be ConvertV1alpha3AzureClusterStatusToV1beta1AzureClusterStatus (golint)
    • Line 147: warning: comment on exported function Convert_v1alpha3_AzureClusterSpec_To_v1beta1_AzureClusterSpec should be of the form "Convert_v1alpha3_AzureClusterSpec_To_v1beta1_AzureClusterSpec ..." (golint)
    • Line 148: warning: don't use underscores in Go names; func Convert_v1alpha3_AzureClusterSpec_To_v1beta1_AzureClusterSpec should be ConvertV1alpha3AzureClusterSpecToV1beta1AzureClusterSpec (golint)
    • Line 157: warning: don't use underscores in Go names; func Convert_v1beta1_AzureClusterSpec_To_v1alpha3_AzureClusterSpec should be ConvertV1beta1AzureClusterSpecToV1alpha3AzureClusterSpec (golint)
    • Line 165: warning: comment on exported function Convert_v1beta1_AzureClusterStatus_To_v1alpha3_AzureClusterStatus should be of the form "Convert_v1beta1_AzureClusterStatus_To_v1alpha3_AzureClusterStatus ..." (golint)
    • Line 166: warning: don't use underscores in Go names; func Convert_v1beta1_AzureClusterStatus_To_v1alpha3_AzureClusterStatus should be ConvertV1beta1AzureClusterStatusToV1alpha3AzureClusterStatus (golint)
    • Line 174: warning: comment on exported function Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec should be of the form "Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec ..." (golint)
    • Line 175: warning: don't use underscores in Go names; func Convert_v1alpha3_NetworkSpec_To_v1beta1_NetworkSpec should be ConvertV1alpha3NetworkSpecToV1beta1NetworkSpec (golint)
    • Line 194: warning: comment on exported function Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec should be of the form "Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec ..." (golint)
    • Line 195: warning: don't use underscores in Go names; func Convert_v1beta1_NetworkSpec_To_v1alpha3_NetworkSpec should be ConvertV1beta1NetworkSpecToV1alpha3NetworkSpec (golint)
    • Line 214: warning: comment on exported function Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec should be of the form "Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec ..." (golint)
    • Line 215: warning: don't use underscores in Go names; func Convert_v1beta1_VnetSpec_To_v1alpha3_VnetSpec should be ConvertV1beta1VnetSpecToV1alpha3VnetSpec (golint)
    • Line 219: warning: comment on exported function Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec should be of the form "Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec ..." (golint)
    • Line 220: warning: don't use underscores in Go names; func Convert_v1alpha3_SubnetSpec_To_v1beta1_SubnetSpec should be ConvertV1alpha3SubnetSpecToV1beta1SubnetSpec (golint)
    • Line 224: warning: comment on exported function Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec should be of the form "Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec ..." (golint)
    • Line 225: warning: don't use underscores in Go names; func Convert_v1beta1_SubnetSpec_To_v1alpha3_SubnetSpec should be ConvertV1beta1SubnetSpecToV1alpha3SubnetSpec (golint)
    • Line 229: warning: exported function Convert_v1beta1_SecurityGroup_To_v1alpha3_SecurityGroup should have comment or be unexported (golint)
    • Line 229: warning: don't use underscores in Go names; func Convert_v1beta1_SecurityGroup_To_v1alpha3_SecurityGroup should be ConvertV1beta1SecurityGroupToV1alpha3SecurityGroup (golint)
    • Line 248: warning: exported function Convert_v1alpha3_SecurityGroup_To_v1beta1_SecurityGroup should have comment or be unexported (golint)
    • Line 248: warning: don't use underscores in Go names; func Convert_v1alpha3_SecurityGroup_To_v1beta1_SecurityGroup should be ConvertV1alpha3SecurityGroupToV1beta1SecurityGroup (golint)
    • Line 264: warning: comment on exported function Convert_v1alpha3_IngressRule_To_v1beta1_SecurityRule should be of the form "Convert_v1alpha3_IngressRule_To_v1beta1_SecurityRule ..." (golint)
    • Line 265: warning: don't use underscores in Go names; func Convert_v1alpha3_IngressRule_To_v1beta1_SecurityRule should be ConvertV1alpha3IngressRuleToV1beta1SecurityRule (golint)
    • Line 278: warning: comment on exported function Convert_v1beta1_SecurityRule_To_v1alpha3_IngressRule should be of the form "Convert_v1beta1_SecurityRule_To_v1alpha3_IngressRule ..." (golint)
    • Line 279: warning: don't use underscores in Go names; func Convert_v1beta1_SecurityRule_To_v1alpha3_IngressRule should be ConvertV1beta1SecurityRuleToV1alpha3IngressRule (golint)
    • Line 292: warning: don't use underscores in Go names; func Convert_v1alpha3_VnetSpec_To_v1beta1_VnetSpec should be ConvertV1alpha3VnetSpecToV1beta1VnetSpec (golint)
    • Line 297: warning: don't use underscores in Go names; func Convert_v1beta1_LoadBalancerSpec_To_v1alpha3_LoadBalancerSpec should be ConvertV1beta1LoadBalancerSpecToV1alpha3LoadBalancerSpec (golint)
    • Line 302: warning: don't use underscores in Go names; func Convert_v1alpha3_Future_To_v1beta1_Future should be ConvertV1alpha3FutureToV1beta1Future (golint)
    • Line 308: warning: don't use underscores in Go names; func Convert_v1beta1_Future_To_v1alpha3_Future should be ConvertV1beta1FutureToV1alpha3Future (golint)
    • cluster-api-provider-azure/exp/api/v1alpha3/conversion.go
    • Line 28: warning: don't use underscores in Go names; func Convert_v1alpha3_OSDisk_To_v1beta1_OSDisk should be ConvertV1alpha3OSDiskToV1beta1OSDisk (golint)
    • Line 33: warning: don't use underscores in Go names; func Convert_v1beta1_OSDisk_To_v1alpha3_OSDisk should be ConvertV1beta1OSDiskToV1alpha3OSDisk (golint)
    • Line 38: warning: don't use underscores in Go names; func Convert_v1alpha3_Image_To_v1beta1_Image should be ConvertV1alpha3ImageToV1beta1Image (golint)
    • Line 43: warning: don't use underscores in Go names; func Convert_v1beta1_Image_To_v1alpha3_Image should be ConvertV1beta1ImageToV1alpha3Image (golint)
    • Line 48: warning: don't use underscores in Go names; func Convert_v1alpha3_APIEndpoint_To_v1beta1_APIEndpoint should be ConvertV1alpha3APIEndpointToV1beta1APIEndpoint (golint)
    • Line 53: warning: don't use underscores in Go names; func Convert_v1beta1_APIEndpoint_To_v1alpha3_APIEndpoint should be ConvertV1beta1APIEndpointToV1alpha3APIEndpoint (golint)
    • cluster-api-provider-azure/api/v1alpha4/azuremachinetemplate_conversion.go
    • Line 46: warning: receiver name dst should be consistent with previous receiver name src for AzureMachineTemplate (golint)
    • Line 67: warning: receiver name dst should be consistent with previous receiver name src for AzureMachineTemplateList (golint)
    • Line 72: warning: exported function Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha4_AzureMachineTemplateResource should have comment or be unexported (golint)
    • Line 72: warning: don't use underscores in Go names; func Convert_v1beta1_AzureMachineTemplateResource_To_v1alpha4_AzureMachineTemplateResource should be ConvertV1beta1AzureMachineTemplateResourceToV1alpha4AzureMachineTemplateResource (golint)
    • cluster-api-provider-azure/exp/api/v1alpha3/azuremanagedcontrolplane_conversion.go
    • Line 51: warning: receiver name dst should be consistent with previous receiver name src for AzureManagedControlPlane (golint)
    • Line 67: warning: don't use underscores in Go names; func Convert_v1beta1_AzureManagedControlPlaneSpec_To_v1alpha3_AzureManagedControlPlaneSpec should be ConvertV1beta1AzureManagedControlPlaneSpecToV1alpha3AzureManagedControlPlaneSpec (golint)
    • Line 72: warning: don't use underscores in Go names; func Convert_v1beta1_AzureManagedControlPlaneStatus_To_v1alpha3_AzureManagedControlPlaneStatus should be ConvertV1beta1AzureManagedControlPlaneStatusToV1alpha3AzureManagedControlPlaneStatus (golint)
    • cluster-api-provider-azure/api/v1alpha4/azurecluster_conversion.go
    • Line 47: warning: receiver name dst should be consistent with previous receiver name src for AzureCluster (golint)
    • Line 68: warning: receiver name dst should be consistent with previous receiver name src for AzureClusterList (golint)
    • Line 73: warning: comment on exported function Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec should be of the form "Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec ..." (golint)
    • Line 74: warning: don't use underscores in Go names; func Convert_v1beta1_VnetSpec_To_v1alpha4_VnetSpec should be ConvertV1beta1VnetSpecToV1alpha4VnetSpec (golint)
    • Line 79: warning: don't use underscores in Go names; func Convert_v1alpha4_VnetSpec_To_v1beta1_VnetSpec should be ConvertV1alpha4VnetSpecToV1beta1VnetSpec (golint)

gocyclo95%

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.


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!