Preparing report...

Report for github.com/cdongyang/rbtree

A    Great!    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!


gocyclo66%

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.

    • rbtree/tree_test.go
    • Line 353: warning: cyclomatic complexity 71 of function testTree2() is high (> 15) (gocyclo)
    • Line 92: warning: cyclomatic complexity 70 of function testTree() is high (> 15) (gocyclo)

golint55%

Golint is a linter for Go source code.

    • rbtree/map.go
    • Line 25: warning: exported method MapNode.GetData should have comment or be unexported (golint)
    • Line 29: warning: exported method MapNode.SetVal should have comment or be unexported (golint)
    • Line 33: warning: exported method MapNode.Next should have comment or be unexported (golint)
    • Line 37: warning: exported method MapNode.Last should have comment or be unexported (golint)
    • Line 41: warning: exported method MapNode.GetMap should have comment or be unexported (golint)
    • Line 45: warning: exported type Map should have comment or be unexported (golint)
    • Line 49: warning: exported function NewMap should have comment or be unexported (golint)
    • Line 55: warning: exported function NewMultiMap should have comment or be unexported (golint)
    • Line 65: warning: exported method Map.Init should have comment or be unexported (golint)
    • Line 69: warning: exported method Map.Begin should have comment or be unexported (golint)
    • Line 73: warning: exported method Map.End should have comment or be unexported (golint)
    • Line 77: warning: exported method Map.EqualRange should have comment or be unexported (golint)
    • Line 82: warning: exported method Map.EraseNode should have comment or be unexported (golint)
    • Line 86: warning: exported method Map.EraseNodeRange should have comment or be unexported (golint)
    • Line 90: warning: exported method Map.Find should have comment or be unexported (golint)
    • Line 94: warning: exported method Map.Insert should have comment or be unexported (golint)
    • Line 99: warning: exported method Map.LowerBound should have comment or be unexported (golint)
    • Line 103: warning: exported method Map.UpperBound should have comment or be unexported (golint)
    • Line 107: warning: exported method Map.Count should have comment or be unexported (golint)
    • Line 111: warning: exported method Map.Erase should have comment or be unexported (golint)
    • rbtree/runtime.go
    • Line 118: warning: comment on exported function NoescapeInterface should be of the form "NoescapeInterface ..." (golint)
    • rbtree/set.go
    • Line 36: warning: exported type Set should have comment or be unexported (golint)
    • Line 48: warning: comment on exported function NewMultiSet should be of the form "NewMultiSet ..." (golint)
    • Line 77: warning: exported method Set.EqualRange should have comment or be unexported (golint)
    • Line 88: warning: exported method Set.EraseNodeRange should have comment or be unexported (golint)
    • Line 92: warning: exported method Set.Find should have comment or be unexported (golint)
    • Line 96: warning: exported method Set.Insert should have comment or be unexported (golint)
    • Line 101: warning: exported method Set.LowerBound should have comment or be unexported (golint)
    • Line 105: warning: exported method Set.UpperBound should have comment or be unexported (golint)
    • Line 109: warning: exported method Set.Count should have comment or be unexported (golint)
    • Line 113: warning: exported method Set.Erase should have comment or be unexported (golint)
    • rbtree/tree.go
    • Line 11: warning: exported var ErrNotInTree should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign66%

IneffAssign detects ineffectual assignments in Go code.

    • rbtree/tree_test.go
    • Line 377: warning: ineffectual assignment to iter (ineffassign)
    • Line 660: warning: ineffectual assignment to node (ineffassign)
    • Line 674: warning: ineffectual assignment to k (ineffassign)
    • Line 674: warning: ineffectual assignment to v (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!