Preparing report...

Report for github.com/bleemeo/squirreldb

(v0.0.0-20240429082534-c3123d82295c)

A+    Excellent!    Found 21 issues across 121 files

Tweet

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!


gofmt99%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo83%

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.

    • cassandra/index/verify.go
    • Line 570: warning: cyclomatic complexity 58 of function (*verifierExecution).verifyShard() is high (> 15) (gocyclo)
    • Line 364: warning: cyclomatic complexity 36 of function (*verifierExecution).verifyBulk() is high (> 15) (gocyclo)
    • Line 1014: warning: cyclomatic complexity 25 of function (*verifierExecution).verifyExpiration() is high (> 15) (gocyclo)
    • Line 157: warning: cyclomatic complexity 23 of function (*verifierExecution).verify() is high (> 15) (gocyclo)
    • Line 270: warning: cyclomatic complexity 22 of function (*verifierExecution).verifyMissingShard() is high (> 15) (gocyclo)
    • batch/batch_test.go
    • Line 2001: warning: cyclomatic complexity 27 of function Test_takeover() is high (> 15) (gocyclo)
    • Line 1268: warning: cyclomatic complexity 23 of function TestBatch_write() is high (> 15) (gocyclo)
    • batch/batch.go
    • Line 493: warning: cyclomatic complexity 20 of function (*Batch).flush() is high (> 15) (gocyclo)
    • Line 886: warning: cyclomatic complexity 19 of function (*Batch).write() is high (> 15) (gocyclo)
    • Line 348: warning: cyclomatic complexity 18 of function (*Batch).setPointsAndOffset() is high (> 15) (gocyclo)
    • cassandra/index/bulk_deleted.go
    • Line 265: warning: cyclomatic complexity 31 of function (*postingsInShardDeleter).Delete() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 26 of function (*deleter).Delete() is high (> 15) (gocyclo)
    • api/api_test.go
    • Line 77: warning: cyclomatic complexity 22 of function TestAPIRoute() is high (> 15) (gocyclo)
    • api/promql/caching_reader_test.go
    • Line 926: warning: cyclomatic complexity 27 of function Test_cachingReader_Querier() is high (> 15) (gocyclo)
    • Line 1550: warning: cyclomatic complexity 18 of function Test_cachingReaderFromEngine() is high (> 15) (gocyclo)
    • cassandra/index/index_test.go
    • Line 5800: warning: cyclomatic complexity 57 of function Test_expiration() is high (> 15) (gocyclo)
    • Line 4370: warning: cyclomatic complexity 55 of function Test_freeFreeID() is high (> 15) (gocyclo)
    • Line 5353: warning: cyclomatic complexity 54 of function Test_cluster() is high (> 15) (gocyclo)
    • Line 2615: warning: cyclomatic complexity 51 of function Test_sharded_postingsForMatchers() is high (> 15) (gocyclo)
    • Line 6297: warning: cyclomatic complexity 31 of function Test_expiration_longlived() is high (> 15) (gocyclo)
    • Line 8561: warning: cyclomatic complexity 25 of function Test_concurrent_access() is high (> 15) (gocyclo)
    • Line 5000: warning: cyclomatic complexity 22 of function Test_cache_bug_posting_invalidation() is high (> 15) (gocyclo)
    • Line 7760: warning: cyclomatic complexity 21 of function Test_store_errors() is high (> 15) (gocyclo)
    • Line 1631: warning: cyclomatic complexity 20 of function Test_postingsForMatchers() is high (> 15) (gocyclo)
    • Line 8138: warning: cyclomatic complexity 20 of function Test_cluster_expiration_and_error() is high (> 15) (gocyclo)
    • Line 6840: warning: cyclomatic complexity 18 of function Test_getTimeShards() is high (> 15) (gocyclo)
    • Line 6668: warning: cyclomatic complexity 16 of function expirationLonglivedEndOfPhaseCheck() is high (> 15) (gocyclo)
    • Line 4722: warning: cyclomatic complexity 16 of function Benchmark_freeFreeID() is high (> 15) (gocyclo)
    • Line 8387: warning: cyclomatic complexity 16 of function clusterDoOneBatch() is high (> 15) (gocyclo)
    • cassandra/index/index.go
    • Line 1846: warning: cyclomatic complexity 35 of function (*CassandraIndex).createMetrics() is high (> 15) (gocyclo)
    • Line 3418: warning: cyclomatic complexity 32 of function (*CassandraIndex).postingsForMatchers() is high (> 15) (gocyclo)
    • Line 1318: warning: cyclomatic complexity 30 of function (*CassandraIndex).lookupIDs() is high (> 15) (gocyclo)
    • Line 2270: warning: cyclomatic complexity 22 of function (*CassandraIndex).applyUpdatePostingShards() is high (> 15) (gocyclo)
    • Line 2843: warning: cyclomatic complexity 20 of function (*CassandraIndex).cassandraExpire() is high (> 15) (gocyclo)
    • Line 2081: warning: cyclomatic complexity 19 of function (*CassandraIndex).updatePostingShards() is high (> 15) (gocyclo)
    • Line 890: warning: cyclomatic complexity 18 of function (*CassandraIndex).InfoByID() is high (> 15) (gocyclo)
    • Line 2967: warning: cyclomatic complexity 18 of function (*CassandraIndex).cassandraCheckExpire() is high (> 15) (gocyclo)
    • redis/temporarystore/redis.go
    • Line 207: warning: cyclomatic complexity 16 of function (*Redis).GetSetPointsAndOffset() is high (> 15) (gocyclo)
    • Line 299: warning: cyclomatic complexity 16 of function (*Redis).ReadPointsAndOffset() is high (> 15) (gocyclo)

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!