Preparing report...

Report for github.com/couchbase/moss

A+    Excellent!    Found 18 issues across 47 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!


golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


gocyclo61%

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.

    • moss/persister_test.go
    • Line 752: warning: cyclomatic complexity 72 of function TestPersistMergeOps_MB19667() is high (> 15) (gocyclo)
    • Line 219: warning: cyclomatic complexity 52 of function runTestPersister() is high (> 15) (gocyclo)
    • Line 1217: warning: cyclomatic complexity 24 of function Test_LevelCompactDeletes() is high (> 15) (gocyclo)
    • moss/collection_test.go
    • Line 927: warning: cyclomatic complexity 60 of function runOpTests() is high (> 15) (gocyclo)
    • Line 306: warning: cyclomatic complexity 43 of function testOpsBatchSize1() is high (> 15) (gocyclo)
    • Line 107: warning: cyclomatic complexity 33 of function TestEmpty() is high (> 15) (gocyclo)
    • Line 209: warning: cyclomatic complexity 32 of function TestBatchSort() is high (> 15) (gocyclo)
    • Line 1331: warning: cyclomatic complexity 22 of function TestCollectionGet() is high (> 15) (gocyclo)
    • Line 1178: warning: cyclomatic complexity 21 of function TestAllocCollection() is high (> 15) (gocyclo)
    • Line 40: warning: cyclomatic complexity 18 of function TestNewCollectionCloseEvents() is high (> 15) (gocyclo)
    • moss/store_compact.go
    • Line 20: warning: cyclomatic complexity 27 of function (*Store).compactMaybe() is high (> 15) (gocyclo)
    • Line 247: warning: cyclomatic complexity 22 of function (*Store).compact() is high (> 15) (gocyclo)
    • Line 158: warning: cyclomatic complexity 17 of function calcPartialCompactionStart() is high (> 15) (gocyclo)
    • moss/mmap_test.go
    • Line 201: warning: cyclomatic complexity 24 of function TestRefCounting() is high (> 15) (gocyclo)
    • Line 72: warning: cyclomatic complexity 21 of function TestMMapRef() is high (> 15) (gocyclo)
    • moss/dgm_moss_test.go
    • Line 466: warning: cyclomatic complexity 23 of function (*dgmTest).getDGMStats() is high (> 15) (gocyclo)
    • Line 860: warning: cyclomatic complexity 16 of function TestMossDGM() is high (> 15) (gocyclo)
    • moss/iterator.go
    • Line 101: warning: cyclomatic complexity 20 of function (*segmentStack).startIterator() is high (> 15) (gocyclo)
    • Line 232: warning: cyclomatic complexity 17 of function (*iterator).Next() is high (> 15) (gocyclo)
    • moss/smat.go
    • Line 527: warning: cyclomatic complexity 19 of function closeReopenFunc() is high (> 15) (gocyclo)
    • Line 433: warning: cyclomatic complexity 16 of function iteratorNextFunc() is high (> 15) (gocyclo)
    • moss/iterator_test.go
    • Line 490: warning: cyclomatic complexity 26 of function TestIteratorSingleDone() is high (> 15) (gocyclo)
    • Line 334: warning: cyclomatic complexity 23 of function testIteratorSeekTo() is high (> 15) (gocyclo)
    • Line 233: warning: cyclomatic complexity 18 of function testIteratorSingleMergeOp() is high (> 15) (gocyclo)
    • Line 23: warning: cyclomatic complexity 18 of function TestIteratorMergeOps() is high (> 15) (gocyclo)
    • Line 119: warning: cyclomatic complexity 16 of function TestIteratorMergeOps_MB19667() is high (> 15) (gocyclo)
    • moss/collection.go
    • Line 563: warning: cyclomatic complexity 21 of function (*collection).snapshot() is high (> 15) (gocyclo)
    • Line 405: warning: cyclomatic complexity 18 of function (*collection).buildStackDirtyTop() is high (> 15) (gocyclo)
    • moss/store_footer.go
    • Line 138: warning: cyclomatic complexity 21 of function ScanFooter() is high (> 15) (gocyclo)
    • Line 259: warning: cyclomatic complexity 19 of function (*Footer).doLoadSegments() is high (> 15) (gocyclo)
    • moss/store.go
    • Line 520: warning: cyclomatic complexity 18 of function openStore() is high (> 15) (gocyclo)
    • moss/persister.go
    • Line 20: warning: cyclomatic complexity 17 of function (*collection).runPersister() is high (> 15) (gocyclo)
    • moss/store_test.go
    • Line 624: warning: cyclomatic complexity 56 of function testStoreCompaction() is high (> 15) (gocyclo)
    • Line 317: warning: cyclomatic complexity 54 of function testSimpleStoreEx() is high (> 15) (gocyclo)
    • Line 893: warning: cyclomatic complexity 45 of function TestOpenStoreCollection() is high (> 15) (gocyclo)
    • Line 1524: warning: cyclomatic complexity 37 of function TestStoreSnapshotRevert() is high (> 15) (gocyclo)
    • Line 1362: warning: cyclomatic complexity 27 of function TestStoreSnapshotPrevious() is high (> 15) (gocyclo)
    • Line 1229: warning: cyclomatic complexity 26 of function TestStoreNilValue() is high (> 15) (gocyclo)
    • Line 111: warning: cyclomatic complexity 25 of function TestOpenEmptyStore() is high (> 15) (gocyclo)
    • Line 1104: warning: cyclomatic complexity 23 of function TestStoreCompactionDeletions() is high (> 15) (gocyclo)
    • Line 2041: warning: cyclomatic complexity 19 of function TestStoreCrashRecovery() is high (> 15) (gocyclo)
    • Line 2388: warning: cyclomatic complexity 19 of function TestStorePartialCompactionWithMergeOperator() is high (> 15) (gocyclo)
    • Line 1748: warning: cyclomatic complexity 19 of function openStoreAndWriteNItems() is high (> 15) (gocyclo)
    • Line 2143: warning: cyclomatic complexity 18 of function TestStoreLargeDeletions() is high (> 15) (gocyclo)
    • Line 1905: warning: cyclomatic complexity 16 of function TestStoreCollHistograms() 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!