Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
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!
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.
Golint is a linter for Go source code.
-
cluster-api-provider-openstack/api/v1alpha3/conversion.go
- Line 28: warning: exported method OpenStackCluster.ConvertTo should have comment or be unexported (golint)
- Line 34: warning: exported method OpenStackCluster.ConvertFrom should have comment or be unexported (golint)
- Line 42: warning: exported method OpenStackClusterList.ConvertTo should have comment or be unexported (golint)
- Line 48: warning: exported method OpenStackClusterList.ConvertFrom should have comment or be unexported (golint)
- Line 56: warning: exported method OpenStackMachine.ConvertTo should have comment or be unexported (golint)
- Line 62: warning: exported method OpenStackMachine.ConvertFrom should have comment or be unexported (golint)
- Line 70: warning: exported method OpenStackMachineList.ConvertTo should have comment or be unexported (golint)
- Line 76: warning: exported method OpenStackMachineList.ConvertFrom should have comment or be unexported (golint)
- Line 84: warning: exported method OpenStackMachineTemplate.ConvertTo should have comment or be unexported (golint)
- Line 90: warning: exported method OpenStackMachineTemplate.ConvertFrom should have comment or be unexported (golint)
- Line 98: warning: exported method OpenStackMachineTemplateList.ConvertTo should have comment or be unexported (golint)
- Line 104: warning: exported method OpenStackMachineTemplateList.ConvertFrom should have comment or be unexported (golint)
- Line 112: warning: don't use underscores in Go names; func Convert_v1alpha3_OpenStackClusterSpec_To_v1alpha4_OpenStackClusterSpec should be ConvertV1alpha3OpenStackClusterSpecToV1alpha4OpenStackClusterSpec (golint)
- Line 118: warning: don't use underscores in Go names; func Convert_v1alpha3_OpenStackMachineSpec_To_v1alpha4_OpenStackMachineSpec should be ConvertV1alpha3OpenStackMachineSpecToV1alpha4OpenStackMachineSpec (golint)
-
cluster-api-provider-openstack/pkg/cloud/services/networking/floatingip.go
- Line 30: warning: exported method Service.GetOrCreateFloatingIP should have comment or be unexported (golint)
- Line 75: warning: exported method Service.GetFloatingIPByPortID should have comment or be unexported (golint)
- Line 90: warning: exported method Service.DeleteFloatingIP should have comment or be unexported (golint)
- Line 118: warning: exported method Service.AssociateFloatingIP should have comment or be unexported (golint)
- Line 142: warning: exported method Service.DisassociateFloatingIP should have comment or be unexported (golint)
-
cluster-api-provider-openstack/pkg/cloud/services/networking/network.go
- Line 45: warning: exported method Service.ReconcileExternalNetwork should have comment or be unexported (golint)
- Line 93: warning: exported method Service.ReconcileNetwork should have comment or be unexported (golint)
- Line 153: warning: exported method Service.DeleteNetwork should have comment or be unexported (golint)
- Line 174: warning: exported method Service.ReconcileSubnet should have comment or be unexported (golint)
- Line 324: warning: comment on exported method Service.GetNetworkIDsByFilter should be of the form "GetNetworkIDsByFilter ..." (golint)
- Line 337: warning: comment on exported method Service.GetSubnetsByFilter should be of the form "GetSubnetsByFilter ..." (golint)
-
cluster-api-provider-openstack/pkg/cloud/services/compute/instance.go
- Line 55: warning: exported const TimeoutInstanceCreate should have comment (or a comment on this block) or be unexported (golint)
- Line 67: warning: exported method Service.CreateInstance should have comment or be unexported (golint)
- Line 499: warning: exported method Service.AssociateFloatingIP should have comment or be unexported (golint)
- Line 511: warning: exported method Service.DeleteInstance should have comment or be unexported (golint)
- Line 717: warning: exported method Service.GetInstance should have comment or be unexported (golint)
- Line 735: warning: exported method Service.InstanceExists should have comment or be unexported (golint)
- Line 804: warning: exported function GetIPFromInstance should have comment or be unexported (golint)
-
cluster-api-provider-openstack/api/v1alpha3/types.go
- Line 25: warning: exported type ExternalRouterIPParam should have comment or be unexported (golint)
- Line 32: warning: exported type SecurityGroupParam should have comment or be unexported (golint)
- Line 41: warning: exported type SecurityGroupFilter should have comment or be unexported (golint)
- Line 57: warning: exported type NetworkParam should have comment or be unexported (golint)
- Line 68: warning: exported type Filter should have comment or be unexported (golint)
- Line 87: warning: exported type SubnetParam should have comment or be unexported (golint)
- Line 95: warning: exported type SubnetFilter should have comment or be unexported (golint)
- Line 119: warning: exported type Instance should have comment or be unexported (golint)
- Line 141: warning: exported type RootVolume should have comment or be unexported (golint)
- Line 230: warning: exported var InstanceStateBuilding should have comment or be unexported (golint)
-
cluster-api-provider-openstack/api/v1alpha4/types.go
- Line 25: warning: exported type ExternalRouterIPParam should have comment or be unexported (golint)
- Line 32: warning: exported type SecurityGroupParam should have comment or be unexported (golint)
- Line 41: warning: exported type SecurityGroupFilter should have comment or be unexported (golint)
- Line 57: warning: exported type NetworkParam should have comment or be unexported (golint)
- Line 68: warning: exported type Filter should have comment or be unexported (golint)
- Line 87: warning: exported type SubnetParam should have comment or be unexported (golint)
- Line 95: warning: exported type SubnetFilter should have comment or be unexported (golint)
- Line 119: warning: exported type Instance should have comment or be unexported (golint)
- Line 141: warning: exported type RootVolume should have comment or be unexported (golint)
- Line 230: warning: exported var InstanceStateBuilding should have comment or be unexported (golint)
-
cluster-api-provider-openstack/pkg/metrics/metrics.go
- Line 27: warning: exported type OpenstackPrometheusMetrics should have comment or be unexported (golint)
- Line 69: warning: exported var APIRequestPrometheusMetrics should have comment or be unexported (golint)
- Line 92: warning: exported function RegisterAPIPrometheusMetrics should have comment or be unexported (golint)
-
cluster-api-provider-openstack/controllers/openstackmachine_controller.go
- Line 75: warning: exported method OpenStackMachineReconciler.Reconcile should have comment or be unexported (golint)
- Line 151: warning: exported method OpenStackMachineReconciler.SetupWithManager should have comment or be unexported (golint)
- Line 402: warning: comment on exported method OpenStackMachineReconciler.OpenStackClusterToOpenStackMachines should be of the form "OpenStackClusterToOpenStackMachines ..." (golint)
-
cluster-api-provider-openstack/pkg/cloud/services/provider/provider.go
- Line 40: warning: exported const CloudsSecretKey should have comment (or a comment on this block) or be unexported (golint)
- Line 44: warning: exported function NewClientFromMachine should have comment or be unexported (golint)
- Line 62: warning: exported function NewClientFromCluster should have comment or be unexported (golint)
- Line 80: warning: exported function NewClient should have comment or be unexported (golint)
- Line 180: warning: exported function GetProjectID should have comment or be unexported (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!