Preparing report...

Report for github.com/automaticserver/lxe

A+    Excellent!    Found 28 issues across 82 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


golint68%

Golint is a linter for Go source code.

    • lxe/cri/errors.go
    • Line 9: warning: comment on exported type AnnotatedError should be of the form "AnnotatedError ..." (with optional leading article) (golint)
    • Line 24: warning: exported function AnnErr should have comment or be unexported (golint)
    • Line 28: warning: comment on exported type SilentError should be of the form "SilentError ..." (with optional leading article) (golint)
    • Line 33: warning: exported function SilErr should have comment or be unexported (golint)
    • lxe/shared/errors.go
    • Line 16: warning: comment on exported const LXDNotFound should be of the form "LXDNotFound ..." (golint)
    • Line 24: warning: exported function IsErrNotFound should have comment or be unexported (golint)
    • Line 32: warning: exported function NewErrNotFound should have comment or be unexported (golint)
    • lxe/lxf/device/nic.go
    • Line 8: warning: exported const NicType should have comment (or a comment on this block) or be unexported (golint)
    • lxe/network/cni.go
    • Line 22: warning: exported const DefaultCNIbinPath should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported var ErrNoUpdateRuntimeConfig should have comment or be unexported (golint)
    • lxe/network/network.go
    • Line 17: warning: comment on exported type Plugin should be of the form "Plugin ..." (with optional leading article) (golint)
    • Line 82: warning: comment on exported type Status should be of the form "Status ..." (with optional leading article) (golint)
    • lxe/cli/log.go
    • Line 57: warning: exported var ErrUnknownLogTarget should have comment or be unexported (golint)
    • Line 58: warning: exported var ErrLogFilePathRequired should have comment or be unexported (golint)
    • Line 134: warning: exported var ErrUnknownLogFormat should have comment or be unexported (golint)
    • lxe/lxf/client.go
    • Line 21: warning: exported var ErrMissingETag should have comment or be unexported (golint)
    • Line 115: warning: exported type RuntimeInfo should have comment or be unexported (golint)
    • lxe/lxf/lxf_container.go
    • Line 218: warning: exported type EventHandler should have comment or be unexported (golint)
    • Line 285: warning: comment on exported const ContainerSelflinkMatch should be of the form "ContainerSelflinkMatch ..." (golint)
    • Line 288: warning: comment on exported function GetContainerIDFromSelflink should be of the form "GetContainerIDFromSelflink ..." (golint)
    • lxe/lxf/device/block.go
    • Line 1: warning: package comment should be of the form "Package device ..." (golint)
    • Line 7: warning: exported const BlockType should have comment (or a comment on this block) or be unexported (golint)
    • lxe/lxf/device/disk.go
    • Line 9: warning: exported const DiskType should have comment (or a comment on this block) or be unexported (golint)
    • lxe/lxf/device/none.go
    • Line 4: warning: exported const NoneType should have comment (or a comment on this block) or be unexported (golint)
    • lxe/cli/root.go
    • Line 18: warning: exported const AnnIsNonoperational should have comment (or a comment on this block) or be unexported (golint)
    • lxe/cli/version/version.go
    • Line 6: warning: exported var Version should have comment or be unexported (golint)
    • Line 14: warning: exported function String should have comment or be unexported (golint)
    • Line 18: warning: exported function Map should have comment or be unexported (golint)
    • Line 29: warning: exported function MapInf should have comment or be unexported (golint)
    • Line 39: warning: exported function Slice should have comment or be unexported (golint)
    • lxe/lxf/device/char.go
    • Line 1: warning: package comment should be of the form "Package device ..." (golint)
    • Line 7: warning: exported const CharType should have comment (or a comment on this block) or be unexported (golint)
    • lxe/lxf/exec.go
    • Line 19: warning: exported const WindowHeightDefault should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: exported var ErrExecTimeout should have comment or be unexported (golint)
    • lxe/lxf/schema.go
    • Line 1: warning: package comment should be of the form "Package lxf ..." (golint)
    • Line 34: warning: comment on exported function NewMigrationWorkspace should be of the form "NewMigrationWorkspace ..." (golint)
    • lxe/network/lxdbridge.go
    • Line 19: warning: exported const DefaultLXDBridge should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported var ErrNotBridge should have comment or be unexported (golint)
    • Line 140: warning: exported var ErrNotImplemented should have comment or be unexported (golint)
    • lxe/cli/cli.go
    • Line 30: warning: exported function Run should have comment or be unexported (golint)
    • Line 45: warning: exported function IsOperational should have comment or be unexported (golint)

gocyclo92%

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.

    • lxe/lxf/schema.go
    • Line 71: warning: cyclomatic complexity 22 of function (*MigrationWorkspace).Ensure() is high (> 15) (gocyclo)
    • lxe/cri/runtime.go
    • Line 91: warning: cyclomatic complexity 28 of function (RuntimeServer).RunPodSandbox() is high (> 15) (gocyclo)
    • Line 529: warning: cyclomatic complexity 20 of function (RuntimeServer).CreateContainer() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!