Preparing report...

Report for github.com/demonoid81/containerd

A+    Excellent!    Found 118 issues across 562 files

Tweet

gofmt88%

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!


golint97%

Golint is a linter for Go source code.

    • containerd/services/introspection/local.go
    • Line 57: warning: exported type Local should have comment or be unexported (golint)
    • Line 65: warning: exported method Local.UpdateLocal should have comment or be unexported (golint)
    • Line 72: warning: exported method Local.Plugins should have comment or be unexported (golint)
    • Line 99: warning: exported method Local.Server should have comment or be unexported (golint)
    • containerd/runtime/v2/shim/publisher.go
    • Line 44: warning: exported function NewPublisher should have comment or be unexported (golint)
    • Line 60: warning: exported type RemoteEventsPublisher should have comment or be unexported (golint)
    • Line 67: warning: exported method RemoteEventsPublisher.Done should have comment or be unexported (golint)
    • Line 71: warning: exported method RemoteEventsPublisher.Close should have comment or be unexported (golint)
    • Line 103: warning: exported method RemoteEventsPublisher.Publish should have comment or be unexported (golint)
    • containerd/client.go
    • Line 713: warning: exported type ServerInfo should have comment or be unexported (golint)
    • Line 717: warning: exported method Client.Server should have comment or be unexported (golint)

gocyclo88%

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.

    • containerd/metadata/content.go
    • Line 775: warning: cyclomatic complexity 25 of function (*contentStore).garbageCollect() is high (> 15) (gocyclo)
    • Line 360: warning: cyclomatic complexity 23 of function (*contentStore).Writer() is high (> 15) (gocyclo)
    • Line 602: warning: cyclomatic complexity 21 of function (*namespacedWriter).commit() is high (> 15) (gocyclo)
    • containerd/container_test.go
    • Line 1657: warning: cyclomatic complexity 17 of function TestContainerExecLargeOutputWithTTY() is high (> 15) (gocyclo)
    • Line 238: warning: cyclomatic complexity 16 of function TestContainerExec() is high (> 15) (gocyclo)
    • containerd/archive/tar.go
    • Line 123: warning: cyclomatic complexity 34 of function applyNaive() is high (> 15) (gocyclo)
    • Line 462: warning: cyclomatic complexity 33 of function (*changeWriter).HandleChange() is high (> 15) (gocyclo)
    • Line 288: warning: cyclomatic complexity 27 of function createTarFile() is high (> 15) (gocyclo)
    • Line 382: warning: cyclomatic complexity 17 of function mkparent() is high (> 15) (gocyclo)
    • containerd/metadata/gc.go
    • Line 62: warning: cyclomatic complexity 47 of function scanRoots() is high (> 15) (gocyclo)
    • Line 332: warning: cyclomatic complexity 18 of function scanAll() is high (> 15) (gocyclo)
    • containerd/metadata/snapshot.go
    • Line 284: warning: cyclomatic complexity 43 of function (*snapshotter).createSnapshot() is high (> 15) (gocyclo)
    • Line 495: warning: cyclomatic complexity 26 of function (*snapshotter).Commit() is high (> 15) (gocyclo)
    • Line 145: warning: cyclomatic complexity 19 of function (*snapshotter).Update() is high (> 15) (gocyclo)
    • Line 686: warning: cyclomatic complexity 18 of function (*snapshotter).Walk() is high (> 15) (gocyclo)
    • Line 794: warning: cyclomatic complexity 17 of function (*snapshotter).garbageCollect() is high (> 15) (gocyclo)
    • containerd/container_checkpoint_test.go
    • Line 416: warning: cyclomatic complexity 24 of function TestCRWithImagePath() is high (> 15) (gocyclo)
    • Line 42: warning: cyclomatic complexity 20 of function TestCheckpointRestorePTY() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 17 of function TestCheckpointRestore() is high (> 15) (gocyclo)
    • Line 258: warning: cyclomatic complexity 17 of function TestCheckpointRestoreNewContainer() is high (> 15) (gocyclo)
    • containerd/client_test.go
    • Line 68: warning: cyclomatic complexity 17 of function TestMain() is high (> 15) (gocyclo)
    • Line 253: warning: cyclomatic complexity 16 of function TestImagePullSomePlatforms() is high (> 15) (gocyclo)
    • containerd/filters/quote.go
    • Line 48: warning: cyclomatic complexity 35 of function unquoteChar() is high (> 15) (gocyclo)
    • Line 163: warning: cyclomatic complexity 26 of function unquote() is high (> 15) (gocyclo)
    • containerd/snapshots/testsuite/testsuite.go
    • Line 126: warning: cyclomatic complexity 24 of function checkSnapshotterBasic() is high (> 15) (gocyclo)
    • Line 590: warning: cyclomatic complexity 21 of function checkUpdate() is high (> 15) (gocyclo)
    • Line 874: warning: cyclomatic complexity 17 of function check128LayersMount() is high (> 15) (gocyclo)
    • Line 970: warning: cyclomatic complexity 16 of function checkWalk() is high (> 15) (gocyclo)
    • containerd/metadata/containers.go
    • Line 155: warning: cyclomatic complexity 23 of function (*containerStore).Update() is high (> 15) (gocyclo)
    • Line 386: warning: cyclomatic complexity 19 of function writeContainer() is high (> 15) (gocyclo)
    • Line 313: warning: cyclomatic complexity 17 of function readContainer() is high (> 15) (gocyclo)
    • containerd/container_linux_test.go
    • Line 334: warning: cyclomatic complexity 19 of function TestDaemonReconnectsToShimIOPipesOnRestart() is high (> 15) (gocyclo)
    • Line 827: warning: cyclomatic complexity 19 of function TestContainerAttachProcess() is high (> 15) (gocyclo)
    • Line 532: warning: cyclomatic complexity 16 of function TestContainerAttach() is high (> 15) (gocyclo)

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!