Preparing report...

Report for github.com/Mirantis/virtlet

A+    Excellent!    Found 46 issues across 282 files

Tweet

gofmt99%

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.


golint95%

Golint is a linter for Go source code.

    • virtlet/pkg/metadata/types/types.go
    • Line 33: warning: don't use underscores in Go names; const PodSandboxState_SANDBOX_READY should be PodSandboxStateSANDBOXREADY (golint)
    • Line 34: warning: comment on exported const PodSandboxState_SANDBOX_NOTREADY should be of the form "PodSandboxState_SANDBOX_NOTREADY ..." (golint)
    • Line 36: warning: don't use underscores in Go names; const PodSandboxState_SANDBOX_NOTREADY should be PodSandboxStateSANDBOXNOTREADY (golint)
    • Line 44: warning: don't use underscores in Go names; const Protocol_TCP should be ProtocolTCP (golint)
    • Line 45: warning: comment on exported const Protocol_UDP should be of the form "Protocol_UDP ..." (golint)
    • Line 46: warning: don't use underscores in Go names; const Protocol_UDP should be ProtocolUDP (golint)
    • Line 54: warning: don't use underscores in Go names; const ContainerState_CONTAINER_CREATED should be ContainerStateCONTAINERCREATED (golint)
    • Line 55: warning: comment on exported const ContainerState_CONTAINER_RUNNING should be of the form "ContainerState_CONTAINER_RUNNING ..." (golint)
    • Line 56: warning: don't use underscores in Go names; const ContainerState_CONTAINER_RUNNING should be ContainerStateCONTAINERRUNNING (golint)
    • Line 57: warning: comment on exported const ContainerState_CONTAINER_EXITED should be of the form "ContainerState_CONTAINER_EXITED ..." (golint)
    • Line 58: warning: don't use underscores in Go names; const ContainerState_CONTAINER_EXITED should be ContainerStateCONTAINEREXITED (golint)
    • Line 59: warning: comment on exported const ContainerState_CONTAINER_UNKNOWN should be of the form "ContainerState_CONTAINER_UNKNOWN ..." (golint)
    • Line 60: warning: don't use underscores in Go names; const ContainerState_CONTAINER_UNKNOWN should be ContainerStateCONTAINERUNKNOWN (golint)
    • Line 224: warning: receiver name dev should be consistent with previous receiver name d for VMVolumeDevice (golint)
    • virtlet/tests/integration/manager.go
    • Line 77: warning: exported type VirtletManager should have comment or be unexported (golint)
    • Line 86: warning: exported function NewVirtletManager should have comment or be unexported (golint)
    • Line 100: warning: exported method VirtletManager.Run should have comment or be unexported (golint)
    • Line 148: warning: exported method VirtletManager.Close should have comment or be unexported (golint)
    • Line 158: warning: exported function Dial should have comment or be unexported (golint)
    • virtlet/tests/gm/data.go
    • Line 70: warning: exported type JSONVerifier should have comment or be unexported (golint)
    • Line 76: warning: exported function NewJSONVerifier should have comment or be unexported (golint)
    • Line 80: warning: exported method JSONVerifier.Suffix should have comment or be unexported (golint)
    • Line 84: warning: exported method JSONVerifier.Verify should have comment or be unexported (golint)
    • Line 106: warning: exported method JSONVerifier.Marshal should have comment or be unexported (golint)
    • virtlet/tests/longevity/vmcontoller.go
    • Line 29: warning: exported type VMInstance should have comment or be unexported (golint)
    • Line 41: warning: exported method VMInstance.Test should have comment or be unexported (golint)
    • Line 73: warning: exported method VMInstance.Create should have comment or be unexported (golint)
    • Line 91: warning: exported method VMInstance.Delete should have comment or be unexported (golint)
    • Line 99: warning: exported method VMInstance.ReCreate should have comment or be unexported (golint)
    • Line 107: warning: error should be the last type when returning multiple items (golint)
    • Line 125: warning: exported method VMInstance.Stop should have comment or be unexported (golint)
    • virtlet/tests/e2e/ginkgo-ext/scopes.go
    • Line 56: warning: exported var Context should have comment or be unexported (golint)
    • Line 82: warning: exported type Done should have comment or be unexported (golint)
    • Line 141: warning: comment on exported function AfterFailed should be of the form "AfterFailed ..." (golint)
    • virtlet/pkg/utils/testing/runprocess.go
    • Line 24: warning: exported type TestCommand should have comment or be unexported (golint)
    • Line 42: warning: exported method TestCommand.Stop should have comment or be unexported (golint)
    • Line 57: warning: exported method TestCommand.Pid should have comment or be unexported (golint)
    • virtlet/tests/e2e/common.go
    • Line 28: warning: should not use dot imports (golint)
    • Line 34: warning: should not use dot imports (golint)
    • Line 58: warning: comment on exported function UsingCirros should be of the form "UsingCirros ..." (golint)
    • Line 171: warning: exported type VMOptions should have comment or be unexported (golint)
    • Line 173: warning: exported method VMOptions.ApplyDefaults should have comment or be unexported (golint)
    • virtlet/tests/longevity/runner.go
    • Line 31: warning: exported function GetBaseTests should have comment or be unexported (golint)
    • Line 42: warning: exported function GetStressTests should have comment or be unexported (golint)
    • Line 77: warning: exported function Run should have comment or be unexported (golint)
    • virtlet/tests/e2e/framework/controller.go
    • Line 61: warning: exported var ClusterURL should have comment or be unexported (golint)
    • Line 150: warning: exported method Controller.CreateVirtletImageMapping should have comment or be unexported (golint)
    • Line 154: warning: exported method Controller.DeleteVirtletImageMapping should have comment or be unexported (golint)
    • Line 158: warning: exported method Controller.CreateVirtletConfigMapping should have comment or be unexported (golint)
    • Line 162: warning: exported method Controller.DeleteVirtletConfigMapping should have comment or be unexported (golint)
    • Line 327: warning: exported method Controller.WaitForVirtletPodOnTheNode should have comment or be unexported (golint)
    • Line 353: warning: exported method Controller.WaitForVirtletPodToDisappearFromTheNode should have comment or be unexported (golint)
    • virtlet/tests/e2e/framework/localcmd_interface.go
    • Line 11: warning: exported type LocalCmd should have comment or be unexported (golint)
    • Line 15: warning: exported function LocalExecutor should have comment or be unexported (golint)
    • Line 21: warning: exported method LocalCmd.Run should have comment or be unexported (golint)
    • Line 39: warning: exported method LocalCmd.Start should have comment or be unexported (golint)
    • Line 52: warning: exported method LocalCmd.Close should have comment or be unexported (golint)
    • virtlet/pkg/utils/testing/https.go
    • Line 31: warning: exported function GenerateCert should have comment or be unexported (golint)
    • Line 78: warning: exported function EncodePEMCert should have comment or be unexported (golint)
    • Line 84: warning: exported function EncodePEMKey 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.


misspell96%

Misspell Finds commonly misspelled English words