Preparing report...

Report for github.com/miguelmota/cointop

C    Needs some work    Found 21 issues across 115 files

Tweet

gofmt0%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

An error occurred while running this test (AddError: could not parse "_repos/src/github.com/miguelmota/cointop/pkg/color/fatal error: runtime: out of memory:1::warning: file is not gofmted with -s (gofmt)" - strconv.Atoi: parsing " runtime": invalid syntax)


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.

    • cointop/pkg/termui/mbarchart.go
    • Line 59: warning: cyclomatic complexity 21 of function (*MBarChart).layout() is high (> 15) (gocyclo)
    • Line 147: warning: cyclomatic complexity 16 of function (*MBarChart).Buffer() is high (> 15) (gocyclo)

golint86%

Golint is a linter for Go source code.

    • cointop/pkg/termui/events.go
    • Line 17: warning: exported type Event should have comment or be unexported (golint)
    • Line 28: warning: exported type EvtKbd should have comment or be unexported (golint)
    • Line 112: warning: exported type EvtWnd should have comment or be unexported (golint)
    • Line 117: warning: exported type EvtMouse should have comment or be unexported (golint)
    • Line 123: warning: exported type EvtErr should have comment or be unexported (golint)
    • Line 137: warning: exported function NewSysEvtCh should have comment or be unexported (golint)
    • Line 143: warning: exported var DefaultEvtStream should have comment or be unexported (golint)
    • Line 145: warning: exported type EvtStream should have comment or be unexported (golint)
    • Line 155: warning: exported function NewEvtStream should have comment or be unexported (golint)
    • Line 164: warning: exported method EvtStream.Init should have comment or be unexported (golint)
    • Line 190: warning: exported method EvtStream.Merge should have comment or be unexported (golint)
    • Line 206: warning: exported method EvtStream.Handle should have comment or be unexported (golint)
    • Line 226: warning: comment on exported method EvtStream.ResetHandlers should be of the form "ResetHandlers ..." (golint)
    • Line 228: warning: should omit 2nd value from range; this loop is equivalent to `for Path := range ...` (golint)
    • Line 238: warning: exported method EvtStream.Hook should have comment or be unexported (golint)
    • Line 242: warning: exported method EvtStream.Loop should have comment or be unexported (golint)
    • Line 261: warning: exported method EvtStream.StopLoop should have comment or be unexported (golint)
    • Line 270: warning: exported function Merge should have comment or be unexported (golint)
    • Line 274: warning: exported function Handle should have comment or be unexported (golint)
    • Line 278: warning: exported function ResetHandlers should have comment or be unexported (golint)
    • Line 282: warning: exported function Loop should have comment or be unexported (golint)
    • Line 286: warning: exported function StopLoop should have comment or be unexported (golint)
    • Line 290: warning: exported type EvtTimer should have comment or be unexported (golint)
    • Line 295: warning: exported function NewTimerCh should have comment or be unexported (golint)
    • Line 318: warning: exported var DefaultHandler should have comment or be unexported (golint)
    • Line 323: warning: exported function SendCustomEvt should have comment or be unexported (golint)
    • cointop/pkg/termui/mbarchart.go
    • Line 11: warning: comment on exported type MBarChart should be of the form "MBarChart ..." (with optional leading article) (golint)
    • Line 48: warning: comment on exported function NewMBarChart should be of the form "NewMBarChart ..." (golint)
    • Line 139: warning: exported method MBarChart.SetMax should have comment or be unexported (golint)
    • cointop/pkg/termui/widget.go
    • Line 12: warning: comment on exported type WgtMgr should be of the form "WgtMgr ..." (with optional leading article) (golint)
    • Line 15: warning: exported type WgtInfo should have comment or be unexported (golint)
    • Line 21: warning: exported type Widget should have comment or be unexported (golint)
    • Line 25: warning: exported function NewWgtInfo should have comment or be unexported (golint)
    • Line 33: warning: exported function NewWgtMgr should have comment or be unexported (golint)
    • Line 39: warning: exported method WgtMgr.AddWgt should have comment or be unexported (golint)
    • Line 43: warning: exported method WgtMgr.RmWgt should have comment or be unexported (golint)
    • Line 47: warning: exported method WgtMgr.RmWgtById should have comment or be unexported (golint)
    • Line 51: warning: exported method WgtMgr.AddWgtHandler should have comment or be unexported (golint)
    • Line 57: warning: exported method WgtMgr.RmWgtHandler should have comment or be unexported (golint)
    • Line 68: warning: exported function GenId should have comment or be unexported (golint)
    • Line 76: warning: exported method WgtMgr.WgtHandlersHook should have comment or be unexported (golint)
    • Line 86: warning: exported var DefaultWgtMgr should have comment or be unexported (golint)
    • Line 88: warning: exported method Block.Handle should have comment or be unexported (golint)
    • cointop/pkg/termui/block_common.go
    • Line 9: warning: exported const TOP_RIGHT should have comment or be unexported (golint)
    • Line 10: warning: exported const VERTICAL_LINE should have comment or be unexported (golint)
    • Line 11: warning: exported const HORIZONTAL_LINE should have comment or be unexported (golint)
    • Line 12: warning: exported const TOP_LEFT should have comment or be unexported (golint)
    • Line 13: warning: exported const BOTTOM_RIGHT should have comment or be unexported (golint)
    • Line 14: warning: exported const BOTTOM_LEFT should have comment or be unexported (golint)
    • Line 15: warning: exported const VERTICAL_LEFT should have comment or be unexported (golint)
    • Line 16: warning: exported const VERTICAL_RIGHT should have comment or be unexported (golint)
    • Line 17: warning: exported const HORIZONTAL_DOWN should have comment or be unexported (golint)
    • Line 18: warning: exported const HORIZONTAL_UP should have comment or be unexported (golint)
    • Line 19: warning: exported const QUOTA_LEFT should have comment or be unexported (golint)
    • Line 20: warning: exported const QUOTA_RIGHT should have comment or be unexported (golint)
    • cointop/pkg/termui/helper.go
    • Line 34: warning: comment on exported const NumberofColors should be of the form "NumberofColors ..." (golint)
    • Line 217: warning: exported function CellsToStr should have comment or be unexported (golint)
    • cointop/pkg/termui/pos.go
    • Line 24: warning: exported function AlignArea should have comment or be unexported (golint)
    • Line 65: warning: exported function MoveArea should have comment or be unexported (golint)
    • Line 76: warning: exported function TermRect should have comment or be unexported (golint)
    • cointop/pkg/termui/block.go
    • Line 147: warning: exported method Block.Id should have comment or be unexported (golint)
    • Line 228: warning: exported method Block.InnerWidth should have comment or be unexported (golint)
    • Line 232: warning: exported method Block.InnerHeight should have comment or be unexported (golint)
    • Line 236: warning: exported method Block.InnerX should have comment or be unexported (golint)
    • Line 240: warning: exported method Block.InnerY should have comment or be unexported (golint)
    • cointop/pkg/termui/linechart_others.go
    • Line 9: warning: exported const VDASH should have comment or be unexported (golint)
    • Line 10: warning: exported const HDASH should have comment or be unexported (golint)
    • Line 11: warning: exported const ORIGIN should have comment or be unexported (golint)
    • cointop/pkg/termui/render.go
    • Line 168: warning: exported function Clear should have comment or be unexported (golint)
    • Line 180: warning: exported function ClearArea should have comment or be unexported (golint)
    • Line 187: warning: exported function Render should have comment or be unexported (golint)
    • cointop/pkg/termui/sparkline.go
    • Line 60: warning: receiver name sl should be consistent with previous receiver name s for Sparklines (golint)
    • Line 101: warning: receiver name sl should be consistent with previous receiver name s for Sparklines (golint)
    • cointop/pkg/termui/theme.go
    • Line 92: warning: exported var ColorMap should have comment or be unexported (golint)
    • Line 101: warning: exported function ThemeAttr should have comment or be unexported (golint)
    • Line 124: warning: comment on exported function ColorRGB should be of the form "ColorRGB ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words