Repository Analysis

dgraph-io/badger

Fast key-value DB in Go.

1.2 Likely human-written View on GitHub
1.2
Adjusted Score
1.2
Raw Score
100%
Time Factor
2026-05-28
Last Push
15,640
Stars
Go
Language
40,838
Lines of Code
138
Files
43
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 2LOW 41

Pattern Findings

43 matches across 4 categories. Click a row to expand file-level details.

Over-Commented Block40 hits · 40 pts
SeverityFileLineSnippet
LOWstream_writer.go21
LOWbackup.go21)
LOWdb.go741// Note that value will include meta byte.
LOWdb.go1201 case <-lc.HasBeenClosed():
LOWdb.go1221// rewritten if half the space can be discarded. This results in a lifetime
LOWdb2_test.go641 require.NoError(t, db2.Close())
LOWoptions.go201 maxValueThreshold = (1 << 20) // 1 MB
LOWoptions.go281 return superflag
LOWoptions.go361//
LOWoptions.go401
LOWoptions.go461// WithLevelSizeMultiplier returns a new Options value with LevelSizeMultiplier set to the given
LOWoptions.go481 return opt
LOWoptions.go501// VLogPercentile with value 0.99 means 99 percentile of value will be put in LSM tree
LOWoptions.go521}
LOWoptions.go661// WithChecksumVerificationMode returns a new Options value with ChecksumVerificationMode set to
LOWoptions.go701// have better performance and higher levels have better compression ratios.
LOWoptions.go721// set to the given value.
LOWoptions.go741// Zero value for IndexCacheSize means all the indices will be kept in
LOWstream.go41 // Number of goroutines to use for iterating over key ranges. Defaults to 8.
LOWstream.go61 MaxSize uint64
LOWiterator_test.go301 require.NoError(t, db.View(func(txn *Txn) error {
LOWiterator_test.go321//
LOWutil.go61// // debugPrintMore shows key ranges of each level.
LOWtxn.go401// The current transaction keeps a reference to the key and val byte slice
LOWtxn.go621 // In that case, commitTs should not be never be zero. This might happen if
LOWtxn.go641// 5. If callback is provided, Badger will return immediately after checking
LOWtxn.go741//
LOWiterator.go61// KeyCopy returns a copy of the key of the item, writing it to dst slice.
LOWiterator.go441 // ThreadId is an optional value that can be set to identify which goroutine created
LOWlevels.go241 if err := table.DecrRef(); err != nil {
LOWlevels.go761 // - We've already processed `NumVersionsToKeep` number of versions
LOWvalue.go241 size = 0
LOWvalue.go261 // Assume we have 3 move keys in L0.
LOWvalue.go281 // L0 => ....
LOWskl/skl.go41type node struct {
LOWtable/table.go181 freeMe bool // used to determine if the blocked should be reused.
LOWy/watermark.go41// WaterMark is used to keep track of the minimum un-finished index. Typically, an index k becomes
LOWy/error.go1/*
LOWy/bloom.go141}
LOWy/bloom.go161
Slop Phrases1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMoptions.go122// Feel free to modify these to suit your needs with the WithX methods.
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMtable/table_test.go218 // ti.Seek brings us to the first key >= "". Essentially a SeekToFirst.
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippet
LOWtest.sh7# Check if Github Actions is running