Preparing report...

Report for github.com/james-antill/tree

A+    Excellent!    Found 6 issues across 16 files

Tweet

gofmt93%

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!


gocyclo81%

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.

    • tree/node.go
    • Line 679: warning: cyclomatic complexity 52 of function (*Node).print() is high (> 15) (gocyclo)
    • Line 165: warning: cyclomatic complexity 33 of function (*Node).Visit() is high (> 15) (gocyclo)
    • tree/sort.go
    • Line 57: warning: cyclomatic complexity 18 of function NaturalLess() is high (> 15) (gocyclo)

golint68%

Golint is a linter for Go source code.

    • tree/sort.go
    • Line 3: warning: exported method Nodes.Len should have comment or be unexported (golint)
    • Line 4: warning: exported method Nodes.Swap should have comment or be unexported (golint)
    • Line 6: warning: exported type ByFunc should have comment or be unexported (golint)
    • Line 11: warning: exported method ByFunc.Less should have comment or be unexported (golint)
    • Line 15: warning: exported type SortFunc should have comment or be unexported (golint)
    • Line 17: warning: exported function ModSort should have comment or be unexported (golint)
    • Line 23: warning: comment on exported function DirSort should be of the form "DirSort ..." (golint)
    • Line 33: warning: exported function SizeSort should have comment or be unexported (golint)
    • Line 37: warning: exported function NameSort should have comment or be unexported (golint)
    • Line 41: warning: exported function VerSort should have comment or be unexported (golint)
    • tree/cmd/tree/tree.go
    • Line 17: warning: comment on exported var I should be of the form "I ..." (golint)
    • Line 19: warning: exported var L should have comment or be unexported (golint)
    • Line 31: warning: comment on exported var D should be of the form "D ..." (golint)
    • Line 43: warning: comment on exported var U should be of the form "U ..." (golint)
    • Line 52: warning: comment on exported var C should be of the form "C ..." (golint)
    • tree/color.go
    • Line 10: warning: exported const Escape should have comment or be unexported (golint)
    • Line 12: warning: exported const Reset should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: comment on exported const Bold should be of the form "Bold ..." (golint)
    • Line 150: warning: comment on exported function ANSIColor should be of the form "ANSIColor ..." (golint)
    • tree/node.go
    • Line 34: warning: comment on exported type Nodes should be of the form "Nodes ..." (with optional leading article) (golint)
    • Line 37: warning: comment on exported type Fs should be of the form "Fs ..." (with optional leading article) (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!