Preparing report...

Report for github.com/kubernetes/dns

A+    Excellent!    Found 26 issues across 59 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!


gocyclo93%

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.


golint66%

Golint is a linter for Go source code.

    • dns/cmd/kube-dns/app/server.go
    • Line 36: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 47: warning: exported type KubeDNSServer should have comment or be unexported (golint)
    • Line 58: warning: exported function NewKubeDNSServerDefault should have comment or be unexported (golint)
    • Line 125: warning: exported method KubeDNSServer.Run should have comment or be unexported (golint)
    • Line 182: warning: receiver name d should be consistent with previous receiver name server for KubeDNSServer (golint)
    • dns/pkg/dns/config/mocksync.go
    • Line 32: warning: exported function NewMockSync should have comment or be unexported (golint)
    • Line 40: warning: exported method MockSync.Once should have comment or be unexported (golint)
    • Line 44: warning: exported method MockSync.Periodic should have comment or be unexported (golint)
    • dns/pkg/e2e/dnsmasq/nanny.go
    • Line 31: warning: exported type Harness should have comment or be unexported (golint)
    • Line 37: warning: exported method Harness.Setup should have comment or be unexported (golint)
    • Line 43: warning: exported method Harness.Configure should have comment or be unexported (golint)
    • Line 77: warning: exported method Harness.WaitForArgs should have comment or be unexported (golint)
    • dns/cmd/kube-dns/app/options/options.go
    • Line 22: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 35: warning: exported type KubeDNSConfig should have comment or be unexported (golint)
    • Line 57: warning: exported function NewKubeDNSConfig should have comment or be unexported (golint)
    • Line 148: warning: exported method KubeDNSConfig.AddFlags should have comment or be unexported (golint)
    • dns/pkg/e2e/cluster.go
    • Line 107: warning: exported method Cluster.StartEtcd should have comment or be unexported (golint)
    • Line 113: warning: exported method Cluster.StopEtcd should have comment or be unexported (golint)
    • Line 124: warning: exported method Cluster.StartApiServer should have comment or be unexported (golint)
    • Line 141: warning: exported method Cluster.StopApiServer should have comment or be unexported (golint)
    • Line 151: warning: exported method Cluster.WaitForApiServer should have comment or be unexported (golint)
    • Line 166: warning: exported method Cluster.StartKubelet should have comment or be unexported (golint)
    • Line 203: warning: exported method Cluster.StopKubelet should have comment or be unexported (golint)
    • dns/pkg/e2e/logger.go
    • Line 24: warning: exported var Log should have comment or be unexported (golint)
    • Line 35: warning: exported type StandardLogger should have comment or be unexported (golint)
    • Line 37: warning: exported method StandardLogger.Fatal should have comment or be unexported (golint)
    • Line 41: warning: exported method StandardLogger.Fatalf should have comment or be unexported (golint)
    • Line 45: warning: exported method StandardLogger.Log should have comment or be unexported (golint)
    • Line 49: warning: exported method StandardLogger.Logf should have comment or be unexported (golint)
    • Line 53: warning: exported method StandardLogger.LogWithPrefix should have comment or be unexported (golint)
    • Line 57: warning: exported function LogWithPrefix should have comment or be unexported (golint)
    • dns/pkg/e2e/util.go
    • Line 1: warning: package comment should be of the form "Package e2e ..." (golint)
    • Line 24: warning: exported const StandardTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: comment on exported function KeepSudoActive should be of the form "KeepSudoActive ..." (golint)
    • dns/pkg/version/version.go
    • Line 33: warning: exported const VersionFalse should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: warning: exported function VersionVar should have comment or be unexported (golint)
    • Line 81: warning: exported function Version should have comment or be unexported (golint)
    • dns/pkg/dns/dns.go
    • Line 60: warning: exported type KubeDNS should have comment or be unexported (golint)
    • Line 124: warning: exported function NewKubeDNS should have comment or be unexported (golint)
    • Line 188: warning: exported method KubeDNS.Start should have comment or be unexported (golint)
    • Line 250: warning: exported method KubeDNS.GetCacheAsJSON should have comment or be unexported (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!