Preparing report...

Report for github.com/kubernetes-incubator/kompose

A+    Excellent!    Found 17 issues across 37 files

Tweet

gofmt86%

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!


gocyclo75%

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.

    • kompose/pkg/app/app.go
    • Line 56: warning: cyclomatic complexity 30 of function ValidateFlags() is high (> 15) (gocyclo)
    • Line 170: warning: cyclomatic complexity 18 of function validateControllers() is high (> 15) (gocyclo)
    • kompose/pkg/loader/compose/v3.go
    • Line 689: warning: cyclomatic complexity 65 of function mergeComposeObject() is high (> 15) (gocyclo)
    • Line 366: warning: cyclomatic complexity 19 of function dockerComposeToKomposeMapping() is high (> 15) (gocyclo)
    • Line 601: warning: cyclomatic complexity 17 of function parseKomposeLabels() is high (> 15) (gocyclo)

golint83%

Golint is a linter for Go source code.

    • kompose/pkg/transformer/kubernetes/k8sutils.go
    • Line 371: warning: exported method Kubernetes.CreateLBService should have comment or be unexported (golint)
    • Line 444: warning: exported method Kubernetes.UpdateKubernetesObjectsMultipleContainers should have comment or be unexported (golint)
    • Line 654: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 661: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • kompose/pkg/transformer/kubernetes/kubernetes.go
    • Line 595: warning: exported method Kubernetes.ConfigLBServicePorts should have comment or be unexported (golint)
    • Line 861: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • kompose/pkg/transformer/kubernetes/podspec.go
    • Line 16: warning: exported type PodSpec should have comment or be unexported (golint)
    • Line 20: warning: exported type PodSpecOption should have comment or be unexported (golint)
    • Line 22: warning: exported function AddContainer should have comment or be unexported (golint)
    • Line 56: warning: exported function ImagePullSecrets should have comment or be unexported (golint)
    • Line 66: warning: exported function TerminationGracePeriodSeconds should have comment or be unexported (golint)
    • Line 78: warning: comment on exported function ResourcesLimits should be of the form "ResourcesLimits ..." (golint)
    • Line 99: warning: comment on exported function ResourcesRequests should be of the form "ResourcesRequests ..." (golint)
    • Line 120: warning: comment on exported function SecurityContext should be of the form "SecurityContext ..." (golint)
    • Line 172: warning: exported function SetVolumeNames should have comment or be unexported (golint)
    • Line 180: warning: exported function SetVolumes should have comment or be unexported (golint)
    • Line 195: warning: exported function SetVolumeMountPaths should have comment or be unexported (golint)
    • Line 203: warning: exported function SetVolumeMounts should have comment or be unexported (golint)
    • Line 220: warning: comment on exported function SetPorts should be of the form "SetPorts ..." (golint)
    • Line 232: warning: comment on exported function ImagePullPolicy should be of the form "ImagePullPolicy ..." (golint)
    • Line 245: warning: comment on exported function RestartPolicy should be of the form "RestartPolicy ..." (golint)
    • Line 256: warning: exported function HostName should have comment or be unexported (golint)
    • Line 265: warning: exported function DomainName should have comment or be unexported (golint)
    • Line 273: warning: exported function LivenessProbe should have comment or be unexported (golint)
    • Line 314: warning: exported function ReadinessProbe should have comment or be unexported (golint)
    • Line 344: warning: exported function ServiceAccountName should have comment or be unexported (golint)
    • Line 350: warning: exported method PodSpec.Append should have comment or be unexported (golint)
    • Line 357: warning: exported method PodSpec.Get should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!