Preparing report...

Report for github.com/GrappigPanda/Olivia

A    Great!    Found 28 issues across 41 files

Tweet

gofmt92%

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!


gocyclo100%

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.

No problems detected. Good job!


golint31%

Golint is a linter for Go source code.

    • Olivia/network/message_handler/message_handler.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 7: warning: exported type MessageHandler should have comment or be unexported (golint)
    • Line 14: warning: exported type KeyValPair should have comment or be unexported (golint)
    • Line 21: warning: exported function NewMessageHandler should have comment or be unexported (golint)
    • Olivia/dht/peer.go
    • Line 93: warning: comment on exported method Peer.TestConnection should be of the form "TestConnection ..." (golint)
    • Line 175: warning: comment on exported method Peer.GetPeerList should be of the form "GetPeerList ..." (golint)
    • Olivia/network/network_handler.go
    • Line 1: warning: don't use MixedCaps in package name; networkHandler should be networkhandler (golint)
    • Line 10: warning: comment on exported function StartIncomingNetwork should be of the form "StartIncomingNetwork ..." (golint)
    • Olivia/lru/lru_cache.go
    • Line 12: warning: comment on exported type LRUCacheString should be of the form "LRUCacheString ..." (with optional leading article) (golint)
    • Line 23: warning: comment on exported function NewString should be of the form "NewString ..." (golint)
    • Olivia/bloomfilter/bloom_test.go
    • Line 56: warning: should omit 2nd value from range; this loop is equivalent to `for index := range ...` (golint)
    • Line 76: warning: don't use underscores in Go names; var new_bf_str should be newBfStr (golint)
    • Line 78: warning: don't use underscores in Go names; var new_bf should be newBf (golint)
    • Line 97: warning: don't use underscores in Go names; var new_bf_str should be newBfStr (golint)
    • Line 99: warning: don't use underscores in Go names; var new_bf should be newBf (golint)
    • Olivia/network/receiver/receiver.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 5: warning: should not use dot imports (golint)
    • Line 11: warning: exported type IncomingChannel should have comment or be unexported (golint)
    • Line 12: warning: exported type RequesterResponseChannel should have comment or be unexported (golint)
    • Line 14: warning: exported type Receiver should have comment or be unexported (golint)
    • Line 20: warning: exported function NewReceiver should have comment or be unexported (golint)
    • Line 28: warning: exported method Receiver.Run should have comment or be unexported (golint)
    • Olivia/bloomfilter/search/bloom_search.go
    • Line 12: warning: exported type Search should have comment or be unexported (golint)
    • Line 16: warning: exported type BloomSearch should have comment or be unexported (golint)
    • Line 21: warning: exported function NewSearch should have comment or be unexported (golint)
    • Line 25: warning: exported method Search.Recalculate should have comment or be unexported (golint)
    • Line 29: warning: exported method Search.Get should have comment or be unexported (golint)
    • Line 43: warning: exported method Search.GetFromIndices should have comment or be unexported (golint)
    • Olivia/shared/binary_heap.go
    • Line 14: warning: exported const Maintain should have comment (or a comment on this block) or be unexported (golint)
    • Line 208: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 326: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Olivia/bloomfilter/bloom.go
    • Line 12: warning: exported type BloomFilter should have comment or be unexported (golint)
    • Line 22: warning: exported type SimpleBloomFilter should have comment or be unexported (golint)
    • Line 31: warning: comment on exported function NewSimpleBF should be of the form "NewSimpleBF ..." (golint)
    • Line 83: warning: comment on exported method SimpleBloomFilter.Serialize should be of the form "Serialize ..." (golint)
    • Line 89: warning: comment on exported function Deserialize should be of the form "Deserialize ..." (golint)
    • Olivia/parser/definitions.go
    • Line 3: warning: exported var GET_REMOTE_BLOOMFILTER should have comment or be unexported (golint)
    • Line 4: warning: exported var GET_REMOTE_PEERLIST should have comment or be unexported (golint)
    • Olivia/bloomfilter/bitset.go
    • Line 8: warning: exported type Bitset should have comment or be unexported (golint)
    • Line 59: warning: exported method WFBitset.Compare should have comment or be unexported (golint)
    • Line 63: warning: exported method WFBitset.IsSet should have comment or be unexported (golint)
    • Line 67: warning: exported method WFBitset.Len should have comment or be unexported (golint)
    • Olivia/cache/cache.go
    • Line 17: warning: exported type Cache should have comment or be unexported (golint)
    • Line 103: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 147: warning: comment on exported method Cache.EvictExpiredkeys should be of the form "EvictExpiredkeys ..." (golint)
    • Line 180: warning: exported method Cache.DisconnectPeer should have comment or be unexported (golint)
    • Line 198: warning: exported method Cache.AddPeer should have comment or be unexported (golint)
    • Line 208: warning: exported method Cache.ListPeers should have comment or be unexported (golint)
    • Line 252: warning: exported method Cache.GetBloomFilter should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell92%

Misspell Finds commonly misspelled English words

    • Olivia/parser/parser.go
    • Line 33: warning: "grammer" is a misspelling of "grammar" (misspell)
    • Line 64: warning: "grammer" is a misspelling of "grammar" (misspell)
    • Line 65: warning: "seperates" is a misspelling of "separates" (misspell)