Preparing report...

Report for github.com/Workiva/go-datastructures

A+    Excellent!    Found 44 issues across 163 files

Tweet

gofmt95%

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!


gocyclo94%

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.


golint81%

Golint is a linter for Go source code.

    • go-datastructures/trie/dtrie/dtrie_test.go
    • Line 105: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • Line 113: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • Line 125: warning: should omit values from range; this loop is equivalent to `for range ...` (golint)
    • go-datastructures/augmentedtree/atree.go
    • Line 137: warning: receiver name tree should be consistent with previous receiver name t for tree (golint)
    • Line 143: warning: receiver name tree should be consistent with previous receiver name t for tree (golint)
    • Line 148: warning: receiver name tree should be consistent with previous receiver name t for tree (golint)
    • Line 222: warning: receiver name tree should be consistent with previous receiver name t for tree (golint)
    • Line 229: warning: receiver name tree should be consistent with previous receiver name t for tree (golint)
    • Line 310: warning: receiver name tree should be consistent with previous receiver name t for tree (golint)
    • Line 322: warning: receiver name tree should be consistent with previous receiver name t for tree (golint)
    • go-datastructures/btree/immutable/node.go
    • Line 55: warning: exported method Key.ToItem should have comment or be unexported (golint)
    • Line 62: warning: exported type Keys should have comment or be unexported (golint)
    • Line 175: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 450: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-datastructures/mock/batcher.go
    • Line 27: warning: exported type Batcher should have comment or be unexported (golint)
    • Line 32: warning: exported method Batcher.Put should have comment or be unexported (golint)
    • Line 40: warning: exported method Batcher.Get should have comment or be unexported (golint)
    • Line 45: warning: exported method Batcher.Flush should have comment or be unexported (golint)
    • Line 50: warning: exported method Batcher.Dispose should have comment or be unexported (golint)
    • Line 54: warning: exported method Batcher.IsDisposed should have comment or be unexported (golint)
    • go-datastructures/mock/rangetree.go
    • Line 9: warning: exported type RangeTree should have comment or be unexported (golint)
    • Line 15: warning: exported method RangeTree.Add should have comment or be unexported (golint)
    • Line 25: warning: exported method RangeTree.Len should have comment or be unexported (golint)
    • Line 29: warning: exported method RangeTree.Delete should have comment or be unexported (golint)
    • Line 33: warning: exported method RangeTree.Query should have comment or be unexported (golint)
    • Line 43: warning: exported method RangeTree.InsertAtDimension should have comment or be unexported (golint)
    • Line 50: warning: exported method RangeTree.Apply should have comment or be unexported (golint)
    • Line 54: warning: exported method RangeTree.Get should have comment or be unexported (golint)
    • go-datastructures/btree/immutable/rt.go
    • Line 91: warning: exported method Tr.ID should have comment or be unexported (golint)
    • Line 141: warning: exported method Tr.Len should have comment or be unexported (golint)
    • Line 145: warning: exported method Tr.AsMutable should have comment or be unexported (golint)
    • Line 158: warning: exported method Tr.Commit should have comment or be unexported (golint)
    • go-datastructures/btree/plus/node.go
    • Line 72: warning: receiver name ns should be consistent with previous receiver name nodes for nodes (golint)
    • Line 104: warning: receiver name n should be consistent with previous receiver name node for inode (golint)
    • Line 131: warning: receiver name n should be consistent with previous receiver name node for inode (golint)
    • Line 135: warning: receiver name n should be consistent with previous receiver name node for inode (golint)
    • Line 174: warning: receiver name lnode should be consistent with previous receiver name node for lnode (golint)
    • Line 239: warning: receiver name lnode should be consistent with previous receiver name node for lnode (golint)
    • go-datastructures/slice/skip/skip.go
    • Line 187: warning: comment on exported type SkipList should be of the form "SkipList ..." (with optional leading article) (golint)
    • Line 367: warning: comment on exported method SkipList.ReplaceAtPosition should be of the form "ReplaceAtPosition ..." (golint)
    • go-datastructures/btree/immutable/node_gen.go
    • Line 32: warning: exported method ID.Msgsize should have comment or be unexported (golint)
    • Line 102: warning: exported method Key.Msgsize should have comment or be unexported (golint)
    • Line 157: warning: exported method Keys.Msgsize should have comment or be unexported (golint)
    • Line 290: warning: exported method Node.Msgsize should have comment or be unexported (golint)
    • go-datastructures/bitarray/encoding.go
    • Line 98: warning: comment on exported function Uint64FromBytes should be of the form "Uint64FromBytes ..." (golint)
    • Line 117: warning: receiver name ret should be consistent with previous receiver name ba for sparseBitArray (golint)
    • Line 200: warning: receiver name ret should be consistent with previous receiver name ba for bitArray (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words