Preparing report...

Report for github.com/oracle/cluster-api-provider-oci

(v0.1.0)

A+    Excellent!    Found 26 issues across 53 files

Tweet

gofmt96%

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!


gocyclo94%

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.


golint52%

Golint is a linter for Go source code.

    • api/v1beta1/types.go
    • Line 20: warning: exported const ControlPlaneRole should have comment (or a comment on this block) or be unexported (golint)
    • Line 218: warning: exported type EgressSecurityRuleDestinationTypeEnum should have comment or be unexported (golint)
    • Line 239: warning: exported type SubnetType should have comment or be unexported (golint)
    • cloud/scope/service_gateway_reconciler.go
    • Line 29: warning: exported method ClusterScope.ReconcileServiceGateway should have comment or be unexported (golint)
    • Line 52: warning: exported method ClusterScope.UpdateServiceGateway should have comment or be unexported (golint)
    • Line 69: warning: exported method ClusterScope.CreateServiceGateway should have comment or be unexported (golint)
    • Line 108: warning: exported method ClusterScope.DeleteServiceGateway should have comment or be unexported (golint)
    • Line 128: warning: exported method ClusterScope.GetServiceGateway should have comment or be unexported (golint)
    • Line 140: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • main.go
    • Line 49: warning: exported const AuthConfigDirectory should have comment (or a comment on this block) or be unexported (golint)
    • cloud/ociutil/ociutil.go
    • Line 34: warning: exported const WorkRequestPollInterval should have comment (or a comment on this block) or be unexported (golint)
    • controllers/ocimachine_controller.go
    • Line 189: warning: exported method OCIMachineReconciler.OCIClusterToOCIMachines should have comment or be unexported (golint)
    • Line 316: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • cloud/scope/cluster.go
    • Line 41: warning: exported const AvailabilityDomain should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: exported type ClusterScope should have comment or be unexported (golint)
    • Line 113: warning: exported method ClusterScope.ReconcileFailureDomains should have comment or be unexported (golint)
    • Line 120: warning: exported method ClusterScope.IsResourceCreatedByClusterAPI should have comment or be unexported (golint)
    • Line 188: warning: exported method ClusterScope.IsTagsEqual should have comment or be unexported (golint)
    • Line 255: warning: exported method ClusterScope.GetOCICluster should have comment or be unexported (golint)
    • cloud/scope/defaults.go
    • Line 22: warning: exported const VcnDefaultCidr should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported var LoadBalancerPolicy should have comment or be unexported (golint)
    • cloud/scope/vcn_reconciler.go
    • Line 30: warning: exported method ClusterScope.ReconcileVCN should have comment or be unexported (golint)
    • Line 50: warning: exported method ClusterScope.IsVcnEquals should have comment or be unexported (golint)
    • Line 57: warning: exported method ClusterScope.GetVcnName should have comment or be unexported (golint)
    • Line 64: warning: exported method ClusterScope.GetVcnCidr should have comment or be unexported (golint)
    • Line 71: warning: exported method ClusterScope.VCNSpec should have comment or be unexported (golint)
    • Line 79: warning: exported method ClusterScope.GetVCN should have comment or be unexported (golint)
    • Line 91: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 112: warning: exported method ClusterScope.UpdateVCN should have comment or be unexported (golint)
    • Line 130: warning: exported method ClusterScope.CreateVCN should have comment or be unexported (golint)
    • Line 150: warning: exported method ClusterScope.DeleteVCN should have comment or be unexported (golint)
    • cloud/scope/machine.go
    • Line 49: warning: exported const OCIMachineKind should have comment or be unexported (golint)
    • Line 64: warning: exported type MachineScope should have comment or be unexported (golint)
    • Line 259: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 290: warning: receiver name s should be consistent with previous receiver name m for MachineScope (golint)
    • cloud/scope/nsg_reconciler.go
    • Line 30: warning: exported method ClusterScope.ReconcileNSG should have comment or be unexported (golint)
    • Line 80: warning: exported method ClusterScope.GetNSG should have comment or be unexported (golint)
    • Line 92: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 113: warning: exported method ClusterScope.DeleteNSGs should have comment or be unexported (golint)
    • Line 136: warning: exported method ClusterScope.NSGSpec should have comment or be unexported (golint)
    • Line 174: warning: exported method ClusterScope.GetNSGSpec should have comment or be unexported (golint)
    • Line 178: warning: exported method ClusterScope.IsNSGExitsByRole should have comment or be unexported (golint)
    • Line 187: warning: exported method ClusterScope.IsNSGEqual should have comment or be unexported (golint)
    • Line 194: warning: exported method ClusterScope.UpdateNSGSecurityRulesIfNeeded should have comment or be unexported (golint)
    • Line 302: warning: exported method ClusterScope.UpdateNSG should have comment or be unexported (golint)
    • Line 465: warning: exported method ClusterScope.AddNSGSecurityRules should have comment or be unexported (golint)
    • Line 484: warning: exported method ClusterScope.CreateNSG should have comment or be unexported (golint)
    • Line 504: warning: exported method ClusterScope.GetControlPlaneMachineDefaultIngressRules should have comment or be unexported (golint)
    • Line 649: warning: exported method ClusterScope.GetControlPlaneMachineDefaultEgressRules should have comment or be unexported (golint)
    • Line 662: warning: exported method ClusterScope.GetNodeDefaultIngressRules should have comment or be unexported (golint)
    • Line 779: warning: exported method ClusterScope.GetNodeDefaultEgressRules should have comment or be unexported (golint)
    • Line 792: warning: exported method ClusterScope.GetServiceLoadBalancerDefaultIngressRules should have comment or be unexported (golint)
    • Line 837: warning: exported method ClusterScope.GetServiceLoadBalancerDefaultEgressRules should have comment or be unexported (golint)
    • Line 856: warning: exported method ClusterScope.GetControlPlaneEndpointDefaultIngressRules should have comment or be unexported (golint)
    • Line 887: warning: exported method ClusterScope.GetControlPlaneEndpointDefaultEgressRules should have comment or be unexported (golint)
    • cloud/scope/route_table_reconciler.go
    • Line 31: warning: exported method ClusterScope.ReconcileRouteTable should have comment or be unexported (golint)
    • Line 64: warning: exported method ClusterScope.GetDesiredRouteTables should have comment or be unexported (golint)
    • Line 91: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 118: warning: exported method ClusterScope.CreateRouteTable should have comment or be unexported (golint)
    • Line 181: warning: exported method ClusterScope.DeleteRouteTables should have comment or be unexported (golint)
    • Line 211: warning: exported method ClusterScope.UpdateRouteTable should have comment or be unexported (golint)
    • cloud/scope/subnet_reconciler.go
    • Line 29: warning: exported method ClusterScope.ReconcileSubnet should have comment or be unexported (golint)
    • Line 98: warning: exported method ClusterScope.CreateSubnet should have comment or be unexported (golint)
    • Line 133: warning: exported method ClusterScope.UpdateSubnet should have comment or be unexported (golint)
    • Line 155: warning: exported method ClusterScope.DeleteSubnets should have comment or be unexported (golint)
    • Line 178: warning: exported method ClusterScope.GetSubnet should have comment or be unexported (golint)
    • Line 190: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 211: warning: exported method ClusterScope.GetControlPlaneEndpointSubnet should have comment or be unexported (golint)
    • Line 220: warning: exported method ClusterScope.GetControlPlaneMachineSubnet should have comment or be unexported (golint)
    • Line 229: warning: exported method ClusterScope.GetServiceLoadBalancerSubnet should have comment or be unexported (golint)
    • Line 238: warning: exported method ClusterScope.GetNodeSubnet should have comment or be unexported (golint)
    • Line 248: warning: exported method ClusterScope.GetSubnetsSpec should have comment or be unexported (golint)
    • Line 252: warning: exported method ClusterScope.SubnetSpec should have comment or be unexported (golint)
    • Line 327: warning: exported method ClusterScope.IsSubnetsEqual should have comment or be unexported (golint)
    • Line 351: warning: exported method ClusterScope.GetControlPlaneEndpointSubnetCidr should have comment or be unexported (golint)
    • Line 362: warning: exported method ClusterScope.GetServiceLoadBalancerSubnetCidr should have comment or be unexported (golint)
    • Line 373: warning: exported method ClusterScope.NodeSubnetCidr should have comment or be unexported (golint)
    • Line 387: warning: exported method ClusterScope.GetControlPlaneMachineSubnetCidr should have comment or be unexported (golint)
    • cloud/config/config.go
    • Line 30: warning: exported const UseInstancePrincipal should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 142: warning: exported function NewConfigurationProvider should have comment or be unexported (golint)
    • Line 145: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 150: warning: exported function NewConfigurationProviderWithUserPrincipal should have comment or be unexported (golint)
    • Line 165: warning: exported function ReadFile should have comment or be unexported (golint)
    • cloud/scope/security_list_reconciler.go
    • Line 31: warning: exported method ClusterScope.DeleteSecurityLists should have comment or be unexported (golint)
    • Line 56: warning: exported method ClusterScope.CreateSecurityList should have comment or be unexported (golint)
    • Line 91: warning: exported method ClusterScope.IsSecurityListEqual should have comment or be unexported (golint)
    • Line 129: warning: exported method ClusterScope.UpdateSecurityList should have comment or be unexported (golint)
    • Line 249: warning: exported method ClusterScope.IsSecurityListExitsByRole should have comment or be unexported (golint)
    • Line 260: warning: exported method ClusterScope.GetSecurityList should have comment or be unexported (golint)
    • Line 272: warning: if block ends with a return statement, so drop this else and outdent its block (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!