Preparing report...

Report for github.com/tiegz/sparkey-go

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


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!


golint22%

Golint is a linter for Go source code.

    • sparkey-go/sparkey/hash_writer.go
    • Line 10: warning: exported type HashWriter should have comment or be unexported (golint)
    • Line 12: warning: exported function NewHashWriter should have comment or be unexported (golint)
    • Line 12: warning: don't use underscores in Go names; func parameter log_filename should be logFilename (golint)
    • Line 12: warning: don't use underscores in Go names; func parameter index_filename should be indexFilename (golint)
    • sparkey-go/sparkey/log_reader.go
    • Line 10: warning: exported function OpenLogReader should have comment or be unexported (golint)
    • Line 10: warning: don't use underscores in Go names; func parameter log_filename should be logFilename (golint)
    • sparkey-go/sparkey/log_writer.go
    • Line 12: warning: exported function NewLogWriter should have comment or be unexported (golint)
    • Line 12: warning: don't use underscores in Go names; func parameter log_filename should be logFilename (golint)
    • Line 12: warning: don't use underscores in Go names; func parameter compression_type should be compressionType (golint)
    • Line 12: warning: don't use underscores in Go names; func parameter block_size should be blockSize (golint)
    • Line 23: warning: exported function OpenLogWriter should have comment or be unexported (golint)
    • Line 23: warning: don't use underscores in Go names; func parameter log_filename should be logFilename (golint)
    • sparkey-go/sparkey/sparkey.go
    • Line 15: warning: exported const DEFAULT_BLOCK_SIZE should have comment or be unexported (golint)
    • Line 20: warning: exported const COMPRESSION_NONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported const ITERATOR_STATE_NEW should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported const FOR_EACH_LOG should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: exported type Sparkey should have comment or be unexported (golint)
    • Line 50: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 51: warning: don't use underscores in Go names; func parameter compression_type should be compressionType (golint)
    • Line 51: warning: don't use underscores in Go names; func parameter block_size should be blockSize (golint)
    • Line 52: warning: don't use underscores in Go names; var log_filename should be logFilename (golint)
    • Line 53: warning: don't use underscores in Go names; var index_filename should be indexFilename (golint)
    • Line 70: warning: comment on exported function Open should be of the form "Open ..." (golint)
    • Line 72: warning: don't use underscores in Go names; var log_filename should be logFilename (golint)
    • Line 73: warning: don't use underscores in Go names; var index_filename should be indexFilename (golint)
    • Line 88: warning: comment on exported method Sparkey.Put should be of the form "Put ..." (golint)
    • Line 104: warning: comment on exported method Sparkey.Delete should be of the form "Delete ..." (golint)
    • Line 114: warning: comment on exported method Sparkey.Flush should be of the form "Flush ..." (golint)
    • Line 128: warning: comment on exported method Sparkey.Close should be of the form "Close ..." (golint)
    • Line 135: warning: comment on exported method Sparkey.DeleteSparkey should be of the form "DeleteSparkey ..." (golint)
    • Line 147: warning: exported method Sparkey.Size should have comment or be unexported (golint)
    • Line 151: warning: exported method Sparkey.Get should have comment or be unexported (golint)
    • Line 156: warning: don't use underscores in Go names; var wanted_valuelen should be wantedValuelen (golint)
    • Line 157: warning: don't use underscores in Go names; var actual_valuelen should be actualValuelen (golint)
    • Line 160: warning: don't use underscores in Go names; var return_code should be returnCode (golint)
    • Line 171: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 188: warning: don't use underscores in Go names; var valuebuf_value should be valuebufValue (golint)
    • Line 195: warning: comment on exported method Sparkey.ForEachHash should be of the form "ForEachHash ..." (golint)
    • Line 208: warning: comment on exported method Sparkey.ForEachLog should be of the form "ForEachLog ..." (golint)
    • Line 224: warning: don't use underscores in Go names; var wanted_keylen should be wantedKeylen (golint)
    • Line 225: warning: don't use underscores in Go names; var actual_keylen should be actualKeylen (golint)
    • Line 226: warning: don't use underscores in Go names; var wanted_valuelen should be wantedValuelen (golint)
    • Line 227: warning: don't use underscores in Go names; var actual_valuelen should be actualValuelen (golint)
    • Line 230: warning: don't use underscores in Go names; var return_code should be returnCode (golint)
    • Line 270: warning: don't use underscores in Go names; var keybuf_value should be keybufValue (golint)
    • Line 271: warning: don't use underscores in Go names; var valuebuf_value should be valuebufValue (golint)
    • Line 282: warning: exported method Sparkey.MaxKeyLen should have comment or be unexported (golint)
    • Line 287: warning: exported method Sparkey.MaxValueLen should have comment or be unexported (golint)
    • Line 292: warning: exported method Sparkey.PrettyPrintHash should have comment or be unexported (golint)
    • Line 300: warning: exported method Sparkey.PrettyPrintLog should have comment or be unexported (golint)
    • Line 308: warning: comment on exported method Sparkey.GetAll should be of the form "GetAll ..." (golint)
    • sparkey-go/sparkey/hash_reader.go
    • Line 10: warning: exported function OpenHashReader should have comment or be unexported (golint)
    • Line 10: warning: don't use underscores in Go names; func parameter log_filename should be logFilename (golint)
    • Line 10: warning: don't use underscores in Go names; func parameter index_filename should be indexFilename (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign88%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!