Preparing report...

Report for github.com/kubernetes/frakti

A+    Excellent!    Found 41 issues across 86 files

Tweet

gofmt98%

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!


gocyclo95%

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.

    • frakti/pkg/hyper/client.go
    • Line 488: warning: cyclomatic complexity 34 of function (*Client).ExecInContainer() is high (> 15) (gocyclo)
    • Line 626: warning: cyclomatic complexity 30 of function (*Client).AttachContainer() is high (> 15) (gocyclo)
    • Line 722: warning: cyclomatic complexity 24 of function (*Client).ExecInSandbox() is high (> 15) (gocyclo)

golint59%

Golint is a linter for Go source code.

    • frakti/pkg/unikernel/service/unikernelruntime.go
    • Line 43: warning: exported type UnikernelRuntime should have comment or be unexported (golint)
    • Line 70: warning: exported method UnikernelRuntime.ServiceName should have comment or be unexported (golint)
    • Line 74: warning: exported function NewUnikernelRuntimeService should have comment or be unexported (golint)
    • Line 125: warning: receiver name h should be consistent with previous receiver name u for UnikernelRuntime (golint)
    • Line 132: warning: receiver name h should be consistent with previous receiver name u for UnikernelRuntime (golint)
    • frakti/pkg/hyper/checkpoint_store.go
    • Line 50: warning: exported method FileStore.Add should have comment or be unexported (golint)
    • Line 66: warning: exported method FileStore.Get should have comment or be unexported (golint)
    • Line 70: warning: exported method FileStore.Delete should have comment or be unexported (golint)
    • Line 74: warning: exported method FileStore.List should have comment or be unexported (golint)
    • Line 94: warning: exported function NewMemStore should have comment or be unexported (golint)
    • Line 98: warning: exported method MemStore.Add should have comment or be unexported (golint)
    • Line 105: warning: exported method MemStore.Get should have comment or be unexported (golint)
    • Line 115: warning: exported method MemStore.Delete should have comment or be unexported (golint)
    • Line 122: warning: exported method MemStore.List should have comment or be unexported (golint)
    • frakti/pkg/flexvolume/cinder/drivers/rbd.go
    • Line 29: warning: comment on exported const DriverName should be of the form "DriverName ..." (golint)
    • Line 33: warning: comment on exported type RBDDriver should be of the form "RBDDriver ..." (with optional leading article) (golint)
    • Line 37: warning: comment on exported type RBDVolume should be of the form "RBDVolume ..." (with optional leading article) (golint)
    • frakti/pkg/flexvolume/rbd/flexvolume.go
    • Line 29: warning: exported type FlexVolumeDriver should have comment or be unexported (golint)
    • Line 47: warning: comment on exported method FlexVolumeDriver.Init should be of the form "Init ..." (golint)
    • Line 90: warning: comment on exported method FlexVolumeDriver.Attach should be of the form "Attach ..." (golint)
    • Line 95: warning: comment on exported method FlexVolumeDriver.Detach should be of the form "Detach ..." (golint)
    • Line 100: warning: comment on exported method FlexVolumeDriver.WaitForAttach should be of the form "WaitForAttach ..." (golint)
    • Line 105: warning: comment on exported method FlexVolumeDriver.IsAttached should be of the form "IsAttached ..." (golint)
    • Line 110: warning: comment on exported method FlexVolumeDriver.Mount should be of the form "Mount ..." (golint)
    • Line 159: warning: comment on exported method FlexVolumeDriver.Unmount should be of the form "Unmount ..." (golint)
    • frakti/pkg/docker/privilegedruntime.go
    • Line 43: warning: exported type PrivilegedRuntime should have comment or be unexported (golint)
    • Line 47: warning: exported method PrivilegedRuntime.ServiceName should have comment or be unexported (golint)
    • Line 51: warning: exported function NewPrivilegedRuntimeService should have comment or be unexported (golint)
    • frakti/pkg/unikernel/service/container.go
    • Line 389: warning: comment on exported method UnikernelRuntime.UpdateContainerResources should be of the form "UpdateContainerResources ..." (golint)
    • Line 390: warning: receiver name h should be consistent with previous receiver name u for UnikernelRuntime (golint)
    • Line 399: warning: receiver name h should be consistent with previous receiver name u for UnikernelRuntime (golint)
    • Line 404: warning: receiver name h should be consistent with previous receiver name u for UnikernelRuntime (golint)
    • Line 410: warning: receiver name h should be consistent with previous receiver name u for UnikernelRuntime (golint)
    • frakti/pkg/flexvolume/cinder/cinder_util.go
    • Line 30: warning: exported function NewFlexManager should have comment or be unexported (golint)
    • Line 36: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 46: warning: exported method FlexManager.AttachDisk should have comment or be unexported (golint)
    • Line 50: warning: exported method FlexManager.DetachDisk should have comment or be unexported (golint)
    • frakti/pkg/hyper/hyper_checkpoint.go
    • Line 31: warning: exported const ProtocolTCP should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type Protocol should have comment or be unexported (golint)
    • Line 97: warning: exported function NewPersistentCheckpointHandler should have comment or be unexported (golint)
    • Line 107: warning: exported method PersistentCheckpointHandler.CreateCheckpoint should have comment or be unexported (golint)
    • Line 115: warning: exported method PersistentCheckpointHandler.GetCheckpoint should have comment or be unexported (golint)
    • Line 125: warning: exported method PersistentCheckpointHandler.RemoveCheckpoint should have comment or be unexported (golint)
    • Line 132: warning: exported method PersistentCheckpointHandler.ListCheckpoints should have comment or be unexported (golint)
    • Line 141: warning: exported function NewPodSandboxCheckpoint should have comment or be unexported (golint)
    • frakti/pkg/util/metadata/metadata.go
    • Line 27: warning: exported function ExtractStringSlice should have comment or be unexported (golint)
    • Line 51: warning: comment on exported function MapToJsonUnindented should be of the form "MapToJsonUnindented ..." (golint)
    • Line 61: warning: exported function ReadJson should have comment or be unexported (golint)
    • Line 74: warning: exported function WriteJson should have comment or be unexported (golint)
    • frakti/test/e2e/framework/framework.go
    • Line 22: warning: should not use dot imports (golint)
    • Line 23: warning: should not use dot imports (golint)
    • Line 39: warning: exported type FraktiClient should have comment or be unexported (golint)
    • Line 44: warning: exported type TestDataSummary should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function NewDefaultFramework should be of the form "NewDefaultFramework ..." (golint)
    • Line 55: warning: exported function NewFramework should have comment or be unexported (golint)
    • Line 87: warning: exported function KubeDescribe should have comment or be unexported (golint)
    • frakti/test/e2e/framework/test_context.go
    • Line 26: warning: exported type TestContextType should have comment or be unexported (golint)
    • Line 35: warning: exported var TestContext should have comment or be unexported (golint)
    • Line 37: warning: comment on exported function RegisterCommonFlags should be of the form "RegisterCommonFlags ..." (golint)
    • Line 52: warning: exported function RegisterFraktiFlags should have comment or be unexported (golint)
    • frakti/pkg/hyper/ocicni/types.go
    • Line 25: warning: exported const DefaultInterfaceName should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported type CNIPlugin should have comment or be unexported (golint)
    • frakti/pkg/flexvolume/cinder/flexvolume.go
    • Line 29: warning: exported type FlexVolumeDriver should have comment or be unexported (golint)
    • Line 51: warning: comment on exported method FlexVolumeDriver.Init should be of the form "Init ..." (golint)
    • Line 113: warning: comment on exported method FlexVolumeDriver.Attach should be of the form "Attach ..." (golint)
    • Line 118: warning: comment on exported method FlexVolumeDriver.Detach should be of the form "Detach ..." (golint)
    • Line 123: warning: comment on exported method FlexVolumeDriver.WaitForAttach should be of the form "WaitForAttach ..." (golint)
    • Line 128: warning: comment on exported method FlexVolumeDriver.IsAttached should be of the form "IsAttached ..." (golint)
    • Line 133: warning: comment on exported method FlexVolumeDriver.Mount should be of the form "Mount ..." (golint)
    • Line 207: warning: comment on exported method FlexVolumeDriver.Unmount should be of the form "Unmount ..." (golint)
    • frakti/pkg/unikernel/libvirt/vmtools.go
    • Line 34: warning: comment on exported const DefaultMaxMem should be of the form "DefaultMaxMem ..." (golint)
    • Line 36: warning: comment on exported const DefaultMaxCPUs should be of the form "DefaultMaxCPUs ..." (golint)
    • Line 40: warning: exported type VMTool should have comment or be unexported (golint)
    • Line 45: warning: exported function NewVMTool should have comment or be unexported (golint)
    • Line 52: warning: exported type VMInfo should have comment or be unexported (golint)
    • Line 57: warning: exported type VMSetting should have comment or be unexported (golint)
    • Line 67: warning: comment on exported method VMTool.CreateContainer should be of the form "CreateContainer ..." (golint)
    • frakti/pkg/hyper/fake_client_interface_test.go
    • Line 186: warning: don't use underscores in Go names; type fakePublicAPI_ExecVMClient should be fakePublicAPIExecVMClient (golint)
    • Line 373: warning: don't use underscores in Go names; type fakePublicAPI_ExecStartClient should be fakePublicAPIExecStartClient (golint)
    • Line 401: warning: don't use underscores in Go names; type fakePublicAPI_AttachClient should be fakePublicAPIAttachClient (golint)
    • frakti/pkg/flexvolume/metadata.go
    • Line 28: warning: exported const VolIdKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported const CinderConfigKey should be of the form "CinderConfigKey ..." (golint)
    • Line 36: warning: comment on exported const ZoneKey should be of the form "ZoneKey ..." (golint)
    • Line 40: warning: comment on exported const PoolKey should be of the form "PoolKey ..." (golint)
    • Line 46: warning: comment on exported const SystemFsTypeKey should be of the form "SystemFsTypeKey ..." (golint)
    • Line 87: warning: exported type FlexVolumeOptsData should have comment or be unexported (golint)
    • Line 93: warning: exported function WriteJsonOptsFile should have comment or be unexported (golint)
    • Line 97: warning: exported function ReadJsonOptsFile should have comment or be unexported (golint)
    • Line 101: warning: exported function CleanUpMetadataFile should have comment or be unexported (golint)
    • frakti/pkg/hyper/helper.go
    • Line 58: warning: exported const MiB should have comment (or a comment on this block) or be unexported (golint)
    • Line 337: 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)
    • frakti/pkg/util/alternativeruntime/alternativeruntime.go
    • Line 26: warning: comment on exported const PrivilegedRuntimeName should be of the form "PrivilegedRuntimeName ..." (golint)
    • Line 28: warning: comment on exported const UnikernelRuntimeName should be of the form "UnikernelRuntimeName ..." (golint)
    • Line 32: warning: exported type AlternativeRuntimeSets should have comment or be unexported (golint)
    • Line 41: warning: exported function NewAlternativeRuntimeSets should have comment or be unexported (golint)
    • frakti/pkg/flexvolume/gcepd/flexvolume.go
    • Line 28: warning: exported type FlexVolumeDriver should have comment or be unexported (golint)
    • Line 48: warning: comment on exported method FlexVolumeDriver.Init should be of the form "Init ..." (golint)
    • Line 98: warning: comment on exported method FlexVolumeDriver.Attach should be of the form "Attach ..." (golint)
    • Line 103: warning: comment on exported method FlexVolumeDriver.Detach should be of the form "Detach ..." (golint)
    • Line 108: warning: comment on exported method FlexVolumeDriver.WaitForAttach should be of the form "WaitForAttach ..." (golint)
    • Line 113: warning: comment on exported method FlexVolumeDriver.IsAttached should be of the form "IsAttached ..." (golint)
    • Line 118: warning: comment on exported method FlexVolumeDriver.Mount should be of the form "Mount ..." (golint)
    • Line 170: warning: comment on exported method FlexVolumeDriver.Unmount should be of the form "Unmount ..." (golint)
    • frakti/pkg/flexvolume/flexvolume.go
    • Line 25: warning: exported type Driver should have comment or be unexported (golint)
    • Line 42: warning: exported type FlexVolume should have comment or be unexported (golint)
    • Line 47: warning: exported function NewFlexVolume should have comment or be unexported (golint)
    • Line 99: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 109: warning: exported method FlexVolume.Run should have comment or be unexported (golint)
    • Line 109: warning: receiver name d should be consistent with previous receiver name f for FlexVolume (golint)
    • frakti/test/e2e/framework/util.go
    • Line 29: warning: should not use dot imports (golint)
    • Line 30: warning: should not use dot imports (golint)
    • Line 41: warning: comment on exported var DefaultNet should be of the form "DefaultNet ..." (golint)
    • Line 45: warning: exported function LoadDefaultClient should have comment or be unexported (golint)
    • Line 70: warning: exported function Logf should have comment or be unexported (golint)
    • Line 74: warning: exported function Failf should have comment or be unexported (golint)
    • Line 80: warning: exported function Skipf should have comment or be unexported (golint)
    • Line 86: warning: exported function SkipUnlessAtLeast should have comment or be unexported (golint)
    • Line 92: warning: exported function ExpectNoError should have comment or be unexported (golint)
    • Line 99: warning: comment on exported function PodReady should be of the form "PodReady ..." (golint)
    • Line 107: warning: comment on exported function PodFound should be of the form "PodFound ..." (golint)
    • Line 114: warning: exported function CniWork should have comment or be unexported (golint)
    • Line 130: warning: exported function NewUUID should have comment or be unexported (golint)
    • Line 141: warning: exported function ClearAllImages 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.


misspell97%

Misspell Finds commonly misspelled English words