Preparing report...

Report for github.com/iand/gonudb

A+    Excellent!    Found 15 issues across 22 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!


gocyclo95%

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.


golint36%

Golint is a linter for Go source code.

    • gonudb/internal/pool.go
    • Line 8: warning: comment on exported type Pool should be of the form "Pool ..." (with optional leading article) (golint)
    • Line 16: warning: exported function NewPool should have comment or be unexported (golint)
    • Line 23: warning: exported method Pool.IsEmpty should have comment or be unexported (golint)
    • Line 43: warning: exported method Pool.Clear should have comment or be unexported (golint)
    • Line 53: warning: exported method Pool.Find should have comment or be unexported (golint)
    • Line 63: warning: exported method Pool.Has should have comment or be unexported (golint)
    • Line 70: warning: exported method Pool.Insert should have comment or be unexported (golint)
    • Line 92: warning: exported method Pool.WithRecords should have comment or be unexported (golint)
    • Line 98: warning: exported method Pool.WriteRecords should have comment or be unexported (golint)
    • gonudb/internal/store.go
    • Line 16: warning: exported type Store should have comment or be unexported (golint)
    • Line 42: warning: exported function CreateStore should have comment or be unexported (golint)
    • Line 68: warning: exported function OpenStore should have comment or be unexported (golint)
    • Line 176: warning: exported method Store.Close should have comment or be unexported (golint)
    • Line 238: warning: exported method Store.DataFile should have comment or be unexported (golint)
    • Line 239: warning: exported method Store.KeyFile should have comment or be unexported (golint)
    • Line 240: warning: exported method Store.LogFile should have comment or be unexported (golint)
    • Line 242: warning: exported method Store.RecordCount should have comment or be unexported (golint)
    • Line 246: warning: exported method Store.Rate should have comment or be unexported (golint)
    • Line 252: warning: exported method Store.Insert should have comment or be unexported (golint)
    • Line 327: warning: exported method Store.Flush should have comment or be unexported (golint)
    • Line 423: warning: exported method Store.FetchReader should have comment or be unexported (golint)
    • Line 451: warning: exported method Store.Exists should have comment or be unexported (golint)
    • Line 467: warning: exported method Store.DataSize should have comment or be unexported (golint)
    • gonudb/internal/version.go
    • Line 5: warning: exported var GitVersion should have comment or be unexported (golint)
    • Line 9: warning: comment on exported function Version should be of the form "Version ..." (golint)
    • gonudb/internal/cache.go
    • Line 9: warning: exported method CacheData.Find should have comment or be unexported (golint)
    • Line 17: warning: exported method CacheData.Has should have comment or be unexported (golint)
    • Line 22: warning: exported method CacheData.Count should have comment or be unexported (golint)
    • Line 26: warning: exported method CacheData.WithBuckets should have comment or be unexported (golint)
    • Line 39: warning: exported function NewCache should have comment or be unexported (golint)
    • Line 51: warning: exported method Cache.Find should have comment or be unexported (golint)
    • Line 55: warning: exported method Cache.Has should have comment or be unexported (golint)
    • Line 59: warning: exported method Cache.Count should have comment or be unexported (golint)
    • Line 63: warning: exported method Cache.WithBuckets should have comment or be unexported (golint)
    • Line 67: warning: exported method Cache.Insert should have comment or be unexported (golint)
    • Line 77: warning: exported method Cache.Clear should have comment or be unexported (golint)
    • gonudb/internal/format.go
    • Line 28: warning: exported const DatFileHeaderSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 62: warning: exported var DatFileHeaderType should have comment or be unexported (golint)
    • Line 67: warning: exported type DatFileHeader should have comment or be unexported (golint)
    • Line 74: warning: exported method DatFileHeader.Size should have comment or be unexported (golint)
    • Line 140: warning: exported type KeyFileHeader should have comment or be unexported (golint)
    • Line 157: warning: exported method KeyFileHeader.Size should have comment or be unexported (golint)
    • Line 161: warning: exported method KeyFileHeader.DecodeFrom should have comment or be unexported (golint)
    • Line 194: warning: exported method KeyFileHeader.EncodeTo should have comment or be unexported (golint)
    • Line 245: warning: exported type LogFileHeader should have comment or be unexported (golint)
    • Line 257: warning: exported method LogFileHeader.Size should have comment or be unexported (golint)
    • Line 261: warning: exported method LogFileHeader.DecodeFrom should have comment or be unexported (golint)
    • Line 281: warning: exported method LogFileHeader.EncodeTo should have comment or be unexported (golint)
    • Line 306: warning: exported type DataRecord should have comment or be unexported (golint)
    • Line 340: warning: exported type BucketRecord should have comment or be unexported (golint)
    • Line 346: warning: don't use underscores in Go names; func ceil_pow2 should be ceilPow2 (golint)
    • gonudb/store.go
    • Line 13: warning: exported function CreateStore should have comment or be unexported (golint)
    • Line 17: warning: exported function OpenStore should have comment or be unexported (golint)
    • Line 43: warning: exported type StoreOptions should have comment or be unexported (golint)
    • Line 48: warning: exported type Store should have comment or be unexported (golint)
    • Line 52: warning: exported method Store.Close should have comment or be unexported (golint)
    • Line 61: warning: exported method Store.Flush should have comment or be unexported (golint)
    • Line 80: warning: comment on exported method Store.FetchReader should be of the form "FetchReader ..." (golint)
    • Line 120: warning: comment on exported method Store.UID should be of the form "UID ..." (golint)
    • Line 184: warning: comment on exported method RecordScanner.Key should be of the form "Key ..." (golint)
    • Line 194: warning: exported method RecordScanner.Close should have comment or be unexported (golint)
    • Line 295: warning: exported type BucketEntry should have comment or be unexported (golint)
    • Line 306: warning: exported function NewSalt should have comment or be unexported (golint)
    • Line 310: warning: exported function Version should have comment or be unexported (golint)
    • Line 315: warning: exported var ErrAppNumMismatch should have comment or be unexported (golint)
    • Line 343: warning: exported const LogLevelDiagnostics should have comment (or a comment on this block) or be unexported (golint)
    • gonudb/internal/bucketcache.go
    • Line 13: warning: exported type Spiller should have comment or be unexported (golint)
    • Line 19: warning: exported type BucketCache should have comment or be unexported (golint)
    • Line 33: warning: exported method BucketCache.Insert should have comment or be unexported (golint)
    • Line 337: warning: exported method BucketCache.Has should have comment or be unexported (golint)
    • Line 373: warning: exported method BucketCache.WriteDirty should have comment or be unexported (golint)
    • gonudb/internal/field.go
    • Line 9: warning: exported const MaxUint16 should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported const SizeUint16 should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported function DecodeUint16 should have comment or be unexported (golint)
    • Line 34: warning: exported function DecodeUint32 should have comment or be unexported (golint)
    • Line 38: warning: exported function DecodeUint64 should have comment or be unexported (golint)
    • Line 42: warning: exported function DecodeUint48 should have comment or be unexported (golint)
    • Line 48: warning: exported function DecodeUint24 should have comment or be unexported (golint)
    • Line 53: warning: exported function EncodeUint16 should have comment or be unexported (golint)
    • Line 57: warning: exported function EncodeUint32 should have comment or be unexported (golint)
    • Line 61: warning: exported function EncodeUint64 should have comment or be unexported (golint)
    • Line 65: warning: exported function EncodeUint48 should have comment or be unexported (golint)
    • Line 75: warning: exported function EncodeUint24 should have comment or be unexported (golint)
    • gonudb/internal/file.go
    • Line 36: warning: don't use underscores in Go names; func block_size should be blockSize (golint)
    • Line 41: warning: exported type CountWriter should have comment or be unexported (golint)
    • Line 51: warning: exported type WriterFlusher should have comment or be unexported (golint)
    • Line 67: warning: exported function CreateDataFile should have comment or be unexported (golint)
    • Line 134: warning: exported method DataFile.Offset should have comment or be unexported (golint)
    • Line 138: warning: exported method DataFile.Sync should have comment or be unexported (golint)
    • Line 145: warning: exported method DataFile.Flush should have comment or be unexported (golint)
    • Line 149: warning: exported method DataFile.Close should have comment or be unexported (golint)
    • Line 156: warning: exported method DataFile.Size should have comment or be unexported (golint)
    • Line 203: warning: exported method DataFile.LoadRecordHeader should have comment or be unexported (golint)
    • Line 234: warning: exported method DataFile.RecordDataReader should have comment or be unexported (golint)
    • Line 246: warning: exported method DataFile.AppendBucketSpill should have comment or be unexported (golint)
    • Line 281: warning: exported method DataFile.LoadBucketSpill should have comment or be unexported (golint)
    • Line 455: warning: exported method RecordScanner.Close should have comment or be unexported (golint)
    • Line 475: warning: exported function CreateKeyFile should have comment or be unexported (golint)
    • Line 565: warning: exported method KeyFile.Sync should have comment or be unexported (golint)
    • Line 569: warning: exported method KeyFile.Close should have comment or be unexported (golint)
    • Line 573: warning: exported method KeyFile.Size should have comment or be unexported (golint)
    • Line 581: warning: exported method KeyFile.BlockSize should have comment or be unexported (golint)
    • Line 585: warning: exported method KeyFile.Hash should have comment or be unexported (golint)
    • Line 589: warning: exported method KeyFile.HashString should have comment or be unexported (golint)
    • Line 593: warning: exported method KeyFile.LoadBucket should have comment or be unexported (golint)
    • Line 620: warning: comment on exported method KeyFile.PutBucket should be of the form "PutBucket ..." (golint)
    • Line 739: warning: exported method BucketScanner.Close should have comment or be unexported (golint)
    • Line 743: warning: exported type LogFile should have comment or be unexported (golint)
    • Line 773: warning: exported method LogFile.Sync should have comment or be unexported (golint)
    • Line 780: warning: exported method LogFile.Flush should have comment or be unexported (golint)
    • Line 784: warning: exported method LogFile.Close should have comment or be unexported (golint)
    • Line 791: warning: exported method LogFile.Truncate should have comment or be unexported (golint)
    • Line 796: warning: exported method LogFile.Prepare should have comment or be unexported (golint)
    • Line 830: warning: exported method LogFile.AppendBucket should have comment or be unexported (golint)
    • Line 859: warning: exported function NewSectionWriter should have comment or be unexported (golint)
    • gonudb/internal/bucket.go
    • Line 11: warning: comment on exported const BucketHeaderSize should be of the form "BucketHeaderSize ..." (golint)
    • Line 15: warning: comment on exported const BucketEntrySize should be of the form "BucketEntrySize ..." (golint)
    • Line 21: warning: exported function BucketIndex should have comment or be unexported (golint)
    • Line 48: warning: exported type Entry should have comment or be unexported (golint)
    • Line 54: warning: comment on exported type Bucket should be of the form "Bucket ..." (with optional leading article) (golint)
    • Line 65: warning: comment on exported function NewBucket should be of the form "NewBucket ..." (golint)
    • Line 81: warning: exported method Bucket.Lock should have comment or be unexported (golint)
    • Line 85: warning: exported method Bucket.Unlock should have comment or be unexported (golint)
    • Line 118: warning: exported method Bucket.Has should have comment or be unexported (golint)
    • Line 163: warning: exported method Bucket.BlockSize should have comment or be unexported (golint)
    • Line 167: warning: exported method Bucket.IsEmpty should have comment or be unexported (golint)
    • Line 173: warning: exported method Bucket.IsFull should have comment or be unexported (golint)
    • Line 179: warning: exported method Bucket.Capacity should have comment or be unexported (golint)
    • Line 197: warning: exported method Bucket.LowestHash should have comment or be unexported (golint)
    • Line 207: warning: exported method Bucket.HighestHash should have comment or be unexported (golint)
    • Line 226: warning: comment on exported method Bucket.Entry should be of the form "Entry ..." (golint)
    • Line 316: warning: exported method Bucket.CopyInto should have comment or be unexported (golint)
    • gonudb/internal/hasher.go
    • Line 10: warning: exported type Hasher should have comment or be unexported (golint)
    • Line 12: warning: exported method Hasher.Hash should have comment or be unexported (golint)
    • Line 16: warning: exported method Hasher.HashString should have comment or be unexported (golint)

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!