Preparing report...

Report for github.com/opencontainers/umoci

(v0.4.7)

A+    Excellent!    Found 31 issues across 94 files

Tweet

gofmt89%

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!


gocyclo76%

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.

    • oci/casext/gc_test.go
    • Line 206: warning: cyclomatic complexity 17 of function TestGCWithPolicy() is high (> 15) (gocyclo)
    • Line 72: warning: cyclomatic complexity 17 of function TestGCWithNonEmptyIndex() is high (> 15) (gocyclo)
    • pkg/unpriv/unpriv_test.go
    • Line 672: warning: cyclomatic complexity 41 of function TestLink() is high (> 15) (gocyclo)
    • Line 949: warning: cyclomatic complexity 39 of function TestLutimes() is high (> 15) (gocyclo)
    • Line 330: warning: cyclomatic complexity 33 of function TestOpen() is high (> 15) (gocyclo)
    • Line 1348: warning: cyclomatic complexity 32 of function TestMkdirAll() is high (> 15) (gocyclo)
    • Line 467: warning: cyclomatic complexity 31 of function TestReaddir() is high (> 15) (gocyclo)
    • Line 1563: warning: cyclomatic complexity 29 of function TestMkdirRWPerm() is high (> 15) (gocyclo)
    • Line 836: warning: cyclomatic complexity 28 of function TestChtimes() is high (> 15) (gocyclo)
    • Line 1467: warning: cyclomatic complexity 24 of function TestMkdirAllMissing() is high (> 15) (gocyclo)
    • Line 239: warning: cyclomatic complexity 23 of function TestSymlink() is high (> 15) (gocyclo)
    • Line 150: warning: cyclomatic complexity 23 of function TestReadlink() is high (> 15) (gocyclo)
    • Line 1110: warning: cyclomatic complexity 23 of function TestRemove() is high (> 15) (gocyclo)
    • Line 1682: warning: cyclomatic complexity 22 of function TestMkdirRPerm() is high (> 15) (gocyclo)
    • Line 1773: warning: cyclomatic complexity 22 of function TestWalk() is high (> 15) (gocyclo)
    • Line 1264: warning: cyclomatic complexity 22 of function TestMkdir() is high (> 15) (gocyclo)
    • Line 67: warning: cyclomatic complexity 21 of function TestLstat() is high (> 15) (gocyclo)
    • Line 590: warning: cyclomatic complexity 19 of function TestWrapWrite() is high (> 15) (gocyclo)
    • Line 1192: warning: cyclomatic complexity 19 of function TestRemoveAll() is high (> 15) (gocyclo)
    • oci/layer/tar_extract.go
    • Line 388: warning: cyclomatic complexity 53 of function (*TarExtractor).UnpackEntry() is high (> 15) (gocyclo)
    • Line 104: warning: cyclomatic complexity 21 of function (*TarExtractor).restoreMetadata() is high (> 15) (gocyclo)
    • oci/layer/tar_extract_test.go
    • Line 345: warning: cyclomatic complexity 27 of function TestUnpackOpaqueWhiteout() is high (> 15) (gocyclo)
    • Line 574: warning: cyclomatic complexity 26 of function TestUnpackHardlink() is high (> 15) (gocyclo)
    • Line 732: warning: cyclomatic complexity 20 of function TestUnpackEntryMap() is high (> 15) (gocyclo)
    • Line 206: warning: cyclomatic complexity 19 of function TestUnpackEntryWhiteout() is high (> 15) (gocyclo)
    • Line 897: warning: cyclomatic complexity 17 of function TestIsDirlink() is high (> 15) (gocyclo)
    • oci/layer/generate_test.go
    • Line 32: warning: cyclomatic complexity 26 of function TestGenerate() is high (> 15) (gocyclo)
    • Line 140: warning: cyclomatic complexity 16 of function TestGenerateMissingFileError() is high (> 15) (gocyclo)
    • oci/casext/refname_dir_test.go
    • Line 94: warning: cyclomatic complexity 24 of function fakeSetupEngine() is high (> 15) (gocyclo)
    • Line 418: warning: cyclomatic complexity 16 of function TestEngineReferenceReadonly() is high (> 15) (gocyclo)
    • oci/layer/tar_generate_test.go
    • Line 33: warning: cyclomatic complexity 19 of function TestTarGenerateAddFileNormal() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 18 of function TestTarGenerateAddFileSymlink() is high (> 15) (gocyclo)
    • Line 128: warning: cyclomatic complexity 17 of function TestTarGenerateAddFileDirectory() is high (> 15) (gocyclo)
    • repack.go
    • Line 39: warning: cyclomatic complexity 19 of function Repack() is high (> 15) (gocyclo)
    • oci/cas/dir/dir_cas_test.go
    • Line 161: warning: cyclomatic complexity 33 of function TestEngineValidate() is high (> 15) (gocyclo)
    • Line 307: warning: cyclomatic complexity 18 of function TestEngineGCLocking() is high (> 15) (gocyclo)
    • Line 75: warning: cyclomatic complexity 18 of function TestEngineBlob() is high (> 15) (gocyclo)
    • Line 430: warning: cyclomatic complexity 16 of function TestEngineBlobReadonly() is high (> 15) (gocyclo)
    • mutate/mutate_test.go
    • Line 450: warning: cyclomatic complexity 21 of function TestMutatePath() is high (> 15) (gocyclo)
    • Line 199: warning: cyclomatic complexity 20 of function TestMutateAdd() is high (> 15) (gocyclo)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


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!