Preparing report...

Report for github.com/logrange/range

A+    Excellent!    Found 54 issues across 107 files

Tweet

gofmt99%

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!


gocyclo88%

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.


golint69%

Golint is a linter for Go source code.

    • range/pkg/rpc/server.go
    • Line 38: warning: exported type ServerConn should have comment or be unexported (golint)
    • Line 48: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 134: warning: exported method ServerConn.Collect should have comment or be unexported (golint)
    • Line 154: warning: exported method ServerConn.Close should have comment or be unexported (golint)
    • range/pkg/records/chunk/chunkfs/chunk.go
    • Line 107: warning: exported const ChnkDataHeaderSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 123: warning: exported var ErrWrongOffset should have comment or be unexported (golint)
    • Line 398: warning: comment on exported method Chunk.Id should be of the form "Id ..." (golint)
    • range/pkg/utils/strutil/escape.go
    • Line 27: warning: comment on exported type StringEscaper should be of the form "StringEscaper ..." (with optional leading article) (golint)
    • Line 35: warning: comment on exported function NewStringEscaper should be of the form "NewStringEscaper ..." (golint)
    • Line 60: warning: exported method StringEscaper.Escape should have comment or be unexported (golint)
    • Line 64: warning: exported method StringEscaper.Unescape should have comment or be unexported (golint)
    • range/pkg/records/records.go
    • Line 15: warning: package comment should be of the form "Package records ..." (golint)
    • Line 91: warning: exported const IteratorPosUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 94: warning: exported method Record.MakeCopy should have comment or be unexported (golint)
    • range/embed/embed.go
    • Line 33: warning: comment on exported type JCtrlrConfig should be of the form "JCtrlrConfig ..." (with optional leading article) (golint)
    • range/pkg/kv/kv.go
    • Line 65: warning: comment on exported type Version should be of the form "Version ..." (with optional leading article) (golint)
    • Line 74: warning: comment on exported type Record should be of the form "Record ..." (with optional leading article) (golint)
    • Line 150: warning: exported type Records should have comment or be unexported (golint)
    • Line 153: warning: exported const NoLeaseId should have comment or be unexported (golint)
    • Line 156: warning: exported var ErrAlreadyExists should have comment or be unexported (golint)
    • range/pkg/utils/strutil/number.go
    • Line 22: warning: comment on exported function NumOfDigits should be of the form "NumOfDigits ..." (golint)
    • Line 39: warning: comment on exported function NumLexStr should be of the form "NumLexStr ..." (golint)
    • range/pkg/utils/strutil/string.go
    • Line 22: warning: exported function GetRandomString should have comment or be unexported (golint)
    • Line 85: warning: comment on exported function SwapEvenOdd should be of the form "SwapEvenOdd ..." (golint)
    • range/pkg/records/journal/iterator.go
    • Line 29: warning: exported type JIterator should have comment or be unexported (golint)
    • Line 37: warning: exported function NewJIterator should have comment or be unexported (golint)
    • Line 41: warning: exported method JIterator.SetBackward should have comment or be unexported (golint)
    • Line 51: warning: exported method JIterator.Next should have comment or be unexported (golint)
    • Line 64: warning: exported method JIterator.Get should have comment or be unexported (golint)
    • Line 81: warning: exported method JIterator.CurrentPos should have comment or be unexported (golint)
    • Line 85: warning: exported method JIterator.Pos should have comment or be unexported (golint)
    • Line 89: warning: exported method JIterator.SetPos should have comment or be unexported (golint)
    • Line 104: warning: exported method JIterator.Close should have comment or be unexported (golint)
    • Line 110: warning: exported method JIterator.Release should have comment or be unexported (golint)
    • range/pkg/records/journal/journal.go
    • Line 48: warning: comment on exported type ControllerVisitorF should be of the form "ControllerVisitorF ..." (with optional leading article) (golint)
    • Line 132: warning: exported const JOURNAL_NAME_REGEX should have comment or be unexported (golint)
    • Line 134: warning: exported var NameRegExp should have comment or be unexported (golint)
    • Line 144: warning: comment on exported function JHashFromName should be of the form "JHashFromName ..." (golint)
    • Line 156: warning: exported method Pos.Less should have comment or be unexported (golint)
    • Line 160: warning: exported function ParsePos should have comment or be unexported (golint)
    • range/pkg/records/chunk/chunk.go
    • Line 86: warning: exported type Chunks should have comment or be unexported (golint)
    • Line 130: warning: exported var EmptyListener should have comment or be unexported (golint)
    • Line 148: warning: comment on exported function ParseId should be of the form "ParseId ..." (golint)
    • range/pkg/utils/errors/errors.go
    • Line 1: warning: package comment should be of the form "Package errors ..." (golint)
    • Line 21: warning: error var WrongState should have name of the form ErrFoo (golint)
    • Line 21: warning: exported var WrongState should have comment or be unexported (golint)
    • Line 22: warning: error var MaxSizeReached should have name of the form ErrFoo (golint)
    • Line 23: warning: error var NotFound should have name of the form ErrFoo (golint)
    • Line 24: warning: error var ClosedState should have name of the form ErrFoo (golint)
    • Line 25: warning: error var IsNotEmpty should have name of the form ErrFoo (golint)
    • Line 26: warning: error var AlreadyExists should have name of the form ErrFoo (golint)
    • range/pkg/utils/crypto/secret.go
    • Line 1: warning: package comment should be of the form "Package crypto ..." (golint)
    • Line 25: warning: comment on exported function NewSessionId should be of the form "NewSessionId ..." (golint)
    • Line 31: warning: comment on exported function NewPassword should be of the form "NewPassword ..." (golint)
    • range/pkg/cluster/cluster.go
    • Line 35: warning: exported const DefaultRpcPort should have comment (or a comment on this block) or be unexported (golint)
    • Line 38: warning: comment on exported var HostId16 should be of the form "HostId16 ..." (golint)
    • Line 44: warning: comment on exported var LocalHostRpcAddr should be of the form "LocalHostRpcAddr ..." (golint)
    • range/pkg/records/reader.go
    • Line 99: warning: exported method Reader.SetBackward should have comment or be unexported (golint)
    • Line 103: warning: exported method Reader.CurrentPos should have comment or be unexported (golint)
    • range/pkg/transport/transport.go
    • Line 27: warning: exported type Config should have comment or be unexported (golint)
    • Line 43: warning: exported function NewServerListener should have comment or be unexported (golint)
    • Line 56: warning: exported function NewClientConn should have comment or be unexported (golint)
    • Line 72: warning: exported method Config.Apply should have comment or be unexported (golint)
    • Line 96: warning: exported method Config.Check should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign89%

IneffAssign detects ineffectual assignments in Go code.

    • range/pkg/records/chunk/chunkfs/freader_test.go
    • Line 75: warning: ineffectual assignment to err (ineffassign)
    • Line 112: warning: ineffectual assignment to n (ineffassign)
    • Line 112: warning: ineffectual assignment to err (ineffassign)
    • Line 137: warning: ineffectual assignment to err (ineffassign)
    • Line 146: warning: ineffectual assignment to err (ineffassign)
    • Line 151: warning: ineffectual assignment to err (ineffassign)
    • Line 155: warning: ineffectual assignment to err (ineffassign)
    • Line 159: warning: ineffectual assignment to err (ineffassign)
    • Line 164: warning: ineffectual assignment to err (ineffassign)
    • Line 210: warning: ineffectual assignment to err (ineffassign)

misspell91%

Misspell Finds commonly misspelled English words

    • range/pkg/kv/kv.go
    • Line 37: warning: "conjuction" is a misspelling of "conjunction" (misspell)
    • Line 109: warning: "succesful" is a misspelling of "successful" (misspell)