Preparing report...

Report for github.com/k8gb-io/k8gb

A+    Excellent!    Found 40 issues across 63 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!


gocyclo96%

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.

    • k8gb/controllers/gslb_controller.go
    • Line 188: warning: cyclomatic complexity 23 of function (*GslbReconciler).SetupWithManager() is high (> 15) (gocyclo)
    • Line 75: warning: cyclomatic complexity 17 of function (*GslbReconciler).Reconcile() is high (> 15) (gocyclo)

golint42%

Golint is a linter for Go source code.

    • k8gb/terratest/utils/utils.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 100: warning: exported function CreateGslb should have comment or be unexported (golint)
    • Line 116: warning: exported function InstallPodinfo should have comment or be unexported (golint)
    • Line 155: warning: exported function CreateGslbWithHealthyApp should have comment or be unexported (golint)
    • Line 169: warning: exported function AssertGslbStatus should have comment or be unexported (golint)
    • Line 192: warning: exported function AssertGslbSpec should have comment or be unexported (golint)
    • Line 199: warning: exported function AssertDNSEndpointLabel should have comment or be unexported (golint)
    • Line 204: warning: exported function AssertGslbDeleted should have comment or be unexported (golint)
    • Line 222: warning: exported function WaitForLocalGSLB should have comment or be unexported (golint)
    • k8gb/controllers/providers/dns/infoblox-client.go
    • Line 1: warning: package comment should be of the form "Package dns ..." (golint)
    • Line 27: warning: exported type InfobloxClient should have comment or be unexported (golint)
    • Line 31: warning: exported type Client should have comment or be unexported (golint)
    • Line 36: warning: exported function NewInfobloxClient should have comment or be unexported (golint)
    • Line 42: warning: exported method Client.GetObjectManager should have comment or be unexported (golint)
    • k8gb/controllers/providers/assistant/gslb.go
    • Line 1: warning: package comment should be of the form "Package assistant ..." (golint)
    • Line 54: warning: exported function NewGslbAssistant should have comment or be unexported (golint)
    • Line 288: warning: exported method Gslb.GetExternalTargets should have comment or be unexported (golint)
    • k8gb/controllers/logging/logr.go
    • Line 1: warning: package comment should be of the form "Package logging ..." (golint)
    • Line 36: warning: exported function NewLogrAdapter should have comment or be unexported (golint)
    • Line 45: warning: exported method LogrAdapter.Enabled should have comment or be unexported (golint)
    • Line 49: warning: exported method LogrAdapter.Info should have comment or be unexported (golint)
    • Line 66: warning: exported method LogrAdapter.V should have comment or be unexported (golint)
    • Line 79: warning: exported method LogrAdapter.WithValues should have comment or be unexported (golint)
    • Line 93: warning: exported method LogrAdapter.WithName should have comment or be unexported (golint)
    • k8gb/api/v1beta1/gslb_types.go
    • Line 81: warning: exported type HealthStatus should have comment or be unexported (golint)
    • Line 84: warning: exported const Healthy should have comment (or a comment on this block) or be unexported (golint)
    • k8gb/controllers/providers/dns/empty.go
    • Line 1: warning: package comment should be of the form "Package dns ..." (golint)
    • Line 33: warning: exported function NewEmptyDNS should have comment or be unexported (golint)
    • Line 40: warning: exported method EmptyDNSProvider.CreateZoneDelegationForExternalDNS should have comment or be unexported (golint)
    • Line 44: warning: exported method EmptyDNSProvider.GslbIngressExposedIPs should have comment or be unexported (golint)
    • Line 48: warning: exported method EmptyDNSProvider.GetExternalTargets should have comment or be unexported (golint)
    • Line 52: warning: exported method EmptyDNSProvider.SaveDNSEndpoint should have comment or be unexported (golint)
    • Line 56: warning: exported method EmptyDNSProvider.Finalize should have comment or be unexported (golint)
    • k8gb/controllers/providers/dns/factory.go
    • Line 1: warning: package comment should be of the form "Package dns ..." (golint)
    • Line 29: warning: exported type ProviderFactory should have comment or be unexported (golint)
    • Line 34: warning: exported function NewDNSProviderFactory should have comment or be unexported (golint)
    • Line 45: warning: exported method ProviderFactory.Provider should have comment or be unexported (golint)
    • k8gb/controllers/internal/utils/fakedns.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 34: warning: exported type FakeDNSSettings should have comment or be unexported (golint)
    • Line 51: warning: exported type Result should have comment or be unexported (golint)
    • Line 55: warning: exported function NewFakeDNS should have comment or be unexported (golint)
    • Line 65: warning: exported method DNSMock.Start should have comment or be unexported (golint)
    • Line 75: warning: exported method DNSMock.RunTestFunc should have comment or be unexported (golint)
    • Line 87: warning: exported method Result.RequireNoError should have comment or be unexported (golint)
    • Line 91: warning: exported method DNSMock.AddTXTRecord should have comment or be unexported (golint)
    • Line 100: warning: exported method DNSMock.AddNSRecord should have comment or be unexported (golint)
    • Line 109: warning: exported method DNSMock.AddARecord should have comment or be unexported (golint)
    • Line 118: warning: exported method DNSMock.AddAAAARecord should have comment or be unexported (golint)
    • k8gb/controllers/depresolver/depresolver_config.go
    • Line 1: warning: package comment should be of the form "Package depresolver ..." (golint)
    • Line 261: warning: exported method DependencyResolver.GetDeprecations should have comment or be unexported (golint)
    • Line 368: warning: exported method Config.GetExternalClusterNSNames should have comment or be unexported (golint)
    • Line 376: warning: exported method Config.GetClusterNSName should have comment or be unexported (golint)
    • Line 380: warning: exported method Config.GetExternalClusterHeartbeatFQDNs should have comment or be unexported (golint)
    • Line 388: warning: exported method Config.GetClusterHeartbeatFQDN should have comment or be unexported (golint)
    • k8gb/controllers/providers/dns/external.go
    • Line 1: warning: package comment should be of the form "Package dns ..." (golint)
    • Line 35: warning: exported type ExternalDNSType should have comment or be unexported (golint)
    • Line 42: warning: exported type ExternalDNSProvider should have comment or be unexported (golint)
    • Line 51: warning: exported function NewExternalDNS should have comment or be unexported (golint)
    • Line 60: warning: exported method ExternalDNSProvider.CreateZoneDelegationForExternalDNS should have comment or be unexported (golint)
    • Line 110: warning: exported method ExternalDNSProvider.Finalize should have comment or be unexported (golint)
    • Line 114: warning: exported method ExternalDNSProvider.GetExternalTargets should have comment or be unexported (golint)
    • Line 118: warning: exported method ExternalDNSProvider.GslbIngressExposedIPs should have comment or be unexported (golint)
    • Line 122: warning: exported method ExternalDNSProvider.SaveDNSEndpoint should have comment or be unexported (golint)
    • k8gb/controllers/internal/utils/reconciler_result.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 26: warning: exported type ReconcileResultHandler should have comment or be unexported (golint)
    • Line 30: warning: exported function NewReconcileResultHandler should have comment or be unexported (golint)
    • Line 56: warning: exported method ReconcileResultHandler.RequeueNow should have comment or be unexported (golint)
    • k8gb/controllers/internal/utils/dns.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 28: warning: exported type DNSServer should have comment or be unexported (golint)
    • Line 33: warning: exported type DNSList should have comment or be unexported (golint)
    • Line 73: warning: exported function Exchange should have comment or be unexported (golint)
    • k8gb/terratest/utils/extensions.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 42: warning: exported type Workflow should have comment or be unexported (golint)
    • Line 70: warning: exported type Instance should have comment or be unexported (golint)
    • Line 74: warning: exported type TestAppResult should have comment or be unexported (golint)
    • Line 101: warning: exported function NewWorkflow should have comment or be unexported (golint)
    • Line 119: warning: exported method Workflow.WithIngress should have comment or be unexported (golint)
    • Line 127: warning: exported method Workflow.WithGslb should have comment or be unexported (golint)
    • Line 150: warning: exported method Workflow.WithTestApp should have comment or be unexported (golint)
    • Line 157: warning: exported method Workflow.Start should have comment or be unexported (golint)
    • Line 237: warning: exported method Instance.Kill should have comment or be unexported (golint)
    • Line 257: warning: exported method Instance.GetIngressIPs should have comment or be unexported (golint)
    • Line 266: warning: exported method Instance.StopTestApp should have comment or be unexported (golint)
    • Line 272: warning: exported method Instance.StartTestApp should have comment or be unexported (golint)
    • k8gb/controllers/providers/dns/infoblox.go
    • Line 1: warning: package comment should be of the form "Package dns ..." (golint)
    • Line 34: warning: exported type InfobloxProvider should have comment or be unexported (golint)
    • Line 42: warning: exported function NewInfobloxDNS should have comment or be unexported (golint)
    • Line 62: warning: exported method InfobloxProvider.CreateZoneDelegationForExternalDNS should have comment or be unexported (golint)
    • Line 156: warning: exported method InfobloxProvider.Finalize should have comment or be unexported (golint)
    • Line 202: warning: exported method InfobloxProvider.GetExternalTargets should have comment or be unexported (golint)
    • Line 206: warning: exported method InfobloxProvider.GslbIngressExposedIPs should have comment or be unexported (golint)
    • Line 210: warning: exported method InfobloxProvider.SaveDNSEndpoint should have comment or be unexported (golint)
    • k8gb/controllers/providers/metrics/prometheus.go
    • Line 1: warning: package comment should be of the form "Package metrics ..." (golint)
    • Line 43: warning: exported const K8gbGslbErrorsTotal should have comment (or a comment on this block) or be unexported (golint)
    • Line 75: warning: exported type PrometheusMetrics should have comment or be unexported (golint)
    • Line 91: warning: exported method PrometheusMetrics.UpdateIngressHostsPerStatusMetric should have comment or be unexported (golint)
    • Line 111: warning: exported method PrometheusMetrics.UpdateHealthyRecordsMetric should have comment or be unexported (golint)
    • Line 119: warning: exported method PrometheusMetrics.UpdateEndpointStatus should have comment or be unexported (golint)
    • Line 126: warning: exported method PrometheusMetrics.UpdateFailoverStatus should have comment or be unexported (golint)
    • Line 134: warning: exported method PrometheusMetrics.UpdateRoundrobinStatus should have comment or be unexported (golint)
    • Line 138: warning: exported method PrometheusMetrics.UpdateGeoIPStatus should have comment or be unexported (golint)
    • Line 142: warning: exported method PrometheusMetrics.IncrementError should have comment or be unexported (golint)
    • Line 146: warning: exported method PrometheusMetrics.IncrementReconciliation should have comment or be unexported (golint)
    • Line 150: warning: exported method PrometheusMetrics.InfobloxIncrementZoneUpdate should have comment or be unexported (golint)
    • Line 154: warning: exported method PrometheusMetrics.InfobloxIncrementZoneUpdateError should have comment or be unexported (golint)
    • Line 158: warning: exported method PrometheusMetrics.InfobloxIncrementHeartbeat should have comment or be unexported (golint)
    • Line 162: warning: exported method PrometheusMetrics.InfobloxIncrementHeartbeatError should have comment or be unexported (golint)
    • Line 166: warning: exported method PrometheusMetrics.SetRuntimeInfo should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words