Preparing report...

Report for github.com/emer/emergent

A+    Excellent!    Found 50 issues across 89 files

Tweet

gofmt98%

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!


gocyclo85%

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.

    • emergent/netview/netview.go
    • Line 143: warning: cyclomatic complexity 18 of function (*NetView).UpdateImpl() is high (> 15) (gocyclo)
    • Line 760: warning: cyclomatic complexity 18 of function (*NetView).ToolbarConfig() is high (> 15) (gocyclo)
    • Line 916: warning: cyclomatic complexity 17 of function (*NetView).ViewbarConfig() is high (> 15) (gocyclo)
    • emergent/prjn/pooltile.go
    • Line 360: warning: cyclomatic complexity 20 of function (*PoolTile).TopoWtsGauss4D() is high (> 15) (gocyclo)
    • Line 271: warning: cyclomatic complexity 18 of function (*PoolTile).TopoWtsGauss2D() is high (> 15) (gocyclo)
    • Line 557: warning: cyclomatic complexity 18 of function (*PoolTile).TopoWtsSigmoid4D() is high (> 15) (gocyclo)
    • Line 466: warning: cyclomatic complexity 16 of function (*PoolTile).TopoWtsSigmoid2D() is high (> 15) (gocyclo)
    • emergent/prjn/pooltilesub.go
    • Line 356: warning: cyclomatic complexity 20 of function (*PoolTileSub).TopoWtsGauss4D() is high (> 15) (gocyclo)
    • Line 541: warning: cyclomatic complexity 18 of function (*PoolTileSub).TopoWtsSigmoid4D() is high (> 15) (gocyclo)
    • Line 267: warning: cyclomatic complexity 18 of function (*PoolTileSub).TopoWtsGauss2D() is high (> 15) (gocyclo)
    • Line 78: warning: cyclomatic complexity 17 of function (*PoolTileSub).Connect() is high (> 15) (gocyclo)
    • Line 450: warning: cyclomatic complexity 16 of function (*PoolTileSub).TopoWtsSigmoid2D() is high (> 15) (gocyclo)
    • Line 155: warning: cyclomatic complexity 16 of function (*PoolTileSub).ConnectRecip() is high (> 15) (gocyclo)
    • emergent/prjn/poolunifrnd.go
    • Line 129: warning: cyclomatic complexity 22 of function (*PoolUnifRnd).ConnectRnd() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 18 of function (*PoolUnifRnd).ConnectPoolsRnd() is high (> 15) (gocyclo)

golint51%

Golint is a linter for Go source code.

    • emergent/erand/permute.go
    • Line 29: warning: comment on exported function Permutefloat32s should be of the form "Permutefloat32s ..." (golint)
    • Line 39: warning: comment on exported function Permutefloat64s should be of the form "Permutefloat64s ..." (golint)
    • emergent/erand/rndparams.go
    • Line 55: warning: don't use underscores in Go names; var KiT_RndDists should be KiTRndDists (golint)
    • Line 55: warning: exported var KiT_RndDists should have comment or be unexported (golint)
    • Line 57: warning: exported method RndDists.MarshalJSON should have comment or be unexported (golint)
    • Line 58: warning: exported method RndDists.UnmarshalJSON should have comment or be unexported (golint)
    • Line 151: warning: comment on exported function Bet should be of the form "Bet ..." (golint)
    • Line 159: warning: comment on exported function BoolProb should be of the form "BoolProb ..." (golint)
    • emergent/prjn/circle.go
    • Line 32: warning: exported function NewCircle should have comment or be unexported (golint)
    • Line 38: warning: exported method Circle.Defaults should have comment or be unexported (golint)
    • Line 46: warning: exported method Circle.Name should have comment or be unexported (golint)
    • Line 50: warning: exported method Circle.Connect should have comment or be unexported (golint)
    • emergent/prjn/poolonetoone.go
    • Line 24: warning: exported function NewPoolOneToOne should have comment or be unexported (golint)
    • Line 28: warning: exported method PoolOneToOne.Name should have comment or be unexported (golint)
    • Line 32: warning: exported method PoolOneToOne.Connect should have comment or be unexported (golint)
    • Line 178: warning: comment on exported method PoolOneToOne.ConnectOneToOne should be of the form "ConnectOneToOne ..." (golint)
    • emergent/netview/laymesh.go
    • Line 27: warning: don't use underscores in Go names; var KiT_LayMesh should be KiTLayMesh (golint)
    • Line 27: warning: exported var KiT_LayMesh should have comment or be unexported (golint)
    • Line 39: warning: exported method LayMesh.Make should have comment or be unexported (golint)
    • Line 59: warning: exported method LayMesh.Update should have comment or be unexported (golint)
    • Line 79: warning: exported method LayMesh.Make2D should have comment or be unexported (golint)
    • Line 138: warning: exported method LayMesh.Make4D should have comment or be unexported (golint)
    • emergent/netview/layname.go
    • Line 23: warning: don't use underscores in Go names; var KiT_LayName should be KiTLayName (golint)
    • Line 23: warning: exported var KiT_LayName should have comment or be unexported (golint)
    • Line 25: warning: exported method LayName.ConnectEvents3D should have comment or be unexported (golint)
    • emergent/relpos/rel.go
    • Line 106: warning: don't use underscores in Go names; var KiT_Relations should be KiTRelations (golint)
    • Line 106: warning: exported var KiT_Relations should have comment or be unexported (golint)
    • Line 108: warning: exported method Relations.MarshalJSON should have comment or be unexported (golint)
    • Line 109: warning: exported method Relations.UnmarshalJSON should have comment or be unexported (golint)
    • Line 129: warning: don't use underscores in Go names; var KiT_XAligns should be KiTXAligns (golint)
    • Line 129: warning: exported var KiT_XAligns should have comment or be unexported (golint)
    • Line 131: warning: exported method XAligns.MarshalJSON should have comment or be unexported (golint)
    • Line 132: warning: exported method XAligns.UnmarshalJSON should have comment or be unexported (golint)
    • Line 135: warning: exported const Left should have comment (or a comment on this block) or be unexported (golint)
    • Line 147: warning: don't use underscores in Go names; var KiT_YAligns should be KiTYAligns (golint)
    • Line 147: warning: exported var KiT_YAligns should have comment or be unexported (golint)
    • Line 149: warning: exported method YAligns.MarshalJSON should have comment or be unexported (golint)
    • Line 150: warning: exported method YAligns.UnmarshalJSON should have comment or be unexported (golint)
    • Line 153: warning: exported const Front should have comment (or a comment on this block) or be unexported (golint)
    • emergent/weights/wts.go
    • Line 14: warning: exported method Network.SetMetaData should have comment or be unexported (golint)
    • Line 29: warning: exported method Layer.SetMetaData should have comment or be unexported (golint)
    • Line 44: warning: exported method Prjn.SetMetaData should have comment or be unexported (golint)
    • emergent/prjn/onetoone.go
    • Line 19: warning: exported function NewOneToOne should have comment or be unexported (golint)
    • Line 23: warning: exported method OneToOne.Name should have comment or be unexported (golint)
    • Line 27: warning: exported method OneToOne.Connect should have comment or be unexported (golint)
    • emergent/prjn/pooltile.go
    • Line 40: warning: exported function NewPoolTile should have comment or be unexported (golint)
    • Line 54: warning: exported method PoolTile.Defaults should have comment or be unexported (golint)
    • Line 69: warning: exported method PoolTile.Name should have comment or be unexported (golint)
    • Line 73: warning: exported method PoolTile.Connect should have comment or be unexported (golint)
    • Line 140: warning: exported method PoolTile.ConnectRecip should have comment or be unexported (golint)
    • Line 216: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 223: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 243: warning: exported method GaussTopo.Defaults should have comment or be unexported (golint)
    • Line 457: warning: exported method SigmoidTopo.Defaults should have comment or be unexported (golint)
    • emergent/evec/dims.go
    • Line 13: warning: exported const X should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: don't use underscores in Go names; var KiT_Dims should be KiTDims (golint)
    • Line 22: warning: exported var KiT_Dims should have comment or be unexported (golint)
    • emergent/env/freq.go
    • Line 44: warning: exported method FreqTable.Name should have comment or be unexported (golint)
    • Line 45: warning: exported method FreqTable.Desc should have comment or be unexported (golint)
    • Line 47: warning: exported method FreqTable.Validate should have comment or be unexported (golint)
    • Line 61: warning: exported method FreqTable.Init should have comment or be unexported (golint)
    • Line 124: warning: exported method FreqTable.SetTrialName should have comment or be unexported (golint)
    • Line 133: warning: exported method FreqTable.SetGroupName should have comment or be unexported (golint)
    • Line 142: warning: exported method FreqTable.Step should have comment or be unexported (golint)
    • Line 155: warning: exported method FreqTable.Counter should have comment or be unexported (golint)
    • Line 167: warning: exported method FreqTable.State should have comment or be unexported (golint)
    • Line 175: warning: exported method FreqTable.Action should have comment or be unexported (golint)
    • Line 185: warning: exported method FreqTable.Counters should have comment or be unexported (golint)
    • Line 189: warning: exported method FreqTable.States should have comment or be unexported (golint)
    • Line 195: warning: exported method FreqTable.Actions should have comment or be unexported (golint)
    • emergent/popcode/popcode2d.go
    • Line 16: warning: comment on exported type TwoD should be of the form "TwoD ..." (with optional leading article) (golint)
    • Line 29: warning: exported method TwoD.Defaults should have comment or be unexported (golint)
    • emergent/esg/parse.go
    • Line 186: warning: exported method Rules.ParseCurRule should have comment or be unexported (golint)
    • Line 195: warning: exported method Rules.ParseAddItem should have comment or be unexported (golint)
    • Line 205: warning: exported method Rules.ParseElems should have comment or be unexported (golint)
    • Line 223: warning: exported method Rules.ParseState should have comment or be unexported (golint)
    • Line 236: warning: exported method Rules.ParseConds should have comment or be unexported (golint)
    • emergent/prjn/poolsameunit.go
    • Line 23: warning: exported function NewPoolSameUnit should have comment or be unexported (golint)
    • Line 27: warning: exported method PoolSameUnit.Name should have comment or be unexported (golint)
    • Line 31: warning: exported method PoolSameUnit.Connect should have comment or be unexported (golint)
    • Line 126: warning: comment on exported method PoolSameUnit.ConnectOneToOne should be of the form "ConnectOneToOne ..." (golint)
    • emergent/prjn/poolunifrnd.go
    • Line 26: warning: exported function NewPoolUnifRnd should have comment or be unexported (golint)
    • Line 32: warning: exported method PoolUnifRnd.Name should have comment or be unexported (golint)
    • Line 36: warning: exported method PoolUnifRnd.Connect should have comment or be unexported (golint)
    • emergent/netview/netdata.go
    • Line 52: warning: don't use underscores in Go names; var KiT_NetData should be KiTNetData (golint)
    • Line 52: warning: exported var KiT_NetData should have comment or be unexported (golint)
    • Line 274: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 344: warning: exported var NetDataProps should have comment or be unexported (golint)
    • emergent/emer/layer.go
    • Line 275: warning: don't use underscores in Go names; var KiT_LayerType should be KiTLayerType (golint)
    • Line 275: warning: exported var KiT_LayerType should have comment or be unexported (golint)
    • Line 277: warning: exported method LayerType.MarshalJSON should have comment or be unexported (golint)
    • Line 278: warning: exported method LayerType.UnmarshalJSON should have comment or be unexported (golint)
    • emergent/emer/prjn.go
    • Line 277: warning: don't use underscores in Go names; var KiT_PrjnType should be KiTPrjnType (golint)
    • Line 277: warning: exported var KiT_PrjnType should have comment or be unexported (golint)
    • Line 279: warning: exported method PrjnType.MarshalJSON should have comment or be unexported (golint)
    • Line 280: warning: exported method PrjnType.UnmarshalJSON should have comment or be unexported (golint)
    • emergent/env/fixed.go
    • Line 38: warning: exported method FixedTable.Name should have comment or be unexported (golint)
    • Line 39: warning: exported method FixedTable.Desc should have comment or be unexported (golint)
    • Line 41: warning: exported method FixedTable.Validate should have comment or be unexported (golint)
    • Line 51: warning: exported method FixedTable.Init should have comment or be unexported (golint)
    • Line 93: warning: exported method FixedTable.SetTrialName should have comment or be unexported (golint)
    • Line 102: warning: exported method FixedTable.SetGroupName should have comment or be unexported (golint)
    • Line 111: warning: exported method FixedTable.Step should have comment or be unexported (golint)
    • Line 123: warning: exported method FixedTable.Counter should have comment or be unexported (golint)
    • Line 135: warning: exported method FixedTable.State should have comment or be unexported (golint)
    • Line 143: warning: exported method FixedTable.Action should have comment or be unexported (golint)
    • Line 153: warning: exported method FixedTable.Counters should have comment or be unexported (golint)
    • Line 157: warning: exported method FixedTable.States should have comment or be unexported (golint)
    • Line 163: warning: exported method FixedTable.Actions should have comment or be unexported (golint)
    • emergent/esg/item.go
    • Line 54: warning: comment on exported method Item.CondEval should be of the form "CondEval ..." (golint)
    • Line 138: warning: don't use underscores in Go names; var KiT_Elements should be KiTElements (golint)
    • Line 138: warning: exported var KiT_Elements should have comment or be unexported (golint)
    • Line 140: warning: exported method Elements.MarshalJSON should have comment or be unexported (golint)
    • Line 141: warning: exported method Elements.UnmarshalJSON should have comment or be unexported (golint)
    • Line 150: warning: exported const ElementsN should have comment (or a comment on this block) or be unexported (golint)
    • emergent/prjn/unifrnd.go
    • Line 28: warning: exported function NewUnifRnd should have comment or be unexported (golint)
    • Line 32: warning: exported method UnifRnd.Name should have comment or be unexported (golint)
    • Line 36: warning: exported method UnifRnd.Connect should have comment or be unexported (golint)
    • Line 187: warning: exported method UnifRnd.ConnectFull should have comment or be unexported (golint)
    • emergent/netview/layobj.go
    • Line 26: warning: don't use underscores in Go names; var KiT_LayObj should be KiTLayObj (golint)
    • Line 26: warning: exported var KiT_LayObj should have comment or be unexported (golint)
    • Line 28: warning: exported method LayObj.ConnectEvents3D should have comment or be unexported (golint)
    • Line 137: warning: exported var LayObjProps should have comment or be unexported (golint)
    • emergent/netview/netview.go
    • Line 46: warning: don't use underscores in Go names; var KiT_NetView should be KiTNetView (golint)
    • Line 46: warning: exported var KiT_NetView should have comment or be unexported (golint)
    • Line 53: warning: exported method NetView.Defaults should have comment or be unexported (golint)
    • Line 261: warning: exported method NetView.Toolbar should have comment or be unexported (golint)
    • Line 265: warning: exported method NetView.NetLay should have comment or be unexported (golint)
    • Line 269: warning: exported method NetView.Counters should have comment or be unexported (golint)
    • Line 273: warning: exported method NetView.Viewbar should have comment or be unexported (golint)
    • Line 277: warning: exported method NetView.Scene should have comment or be unexported (golint)
    • Line 281: warning: exported method NetView.VarsLay should have comment or be unexported (golint)
    • Line 760: warning: exported method NetView.ToolbarConfig should have comment or be unexported (golint)
    • Line 916: warning: exported method NetView.ViewbarConfig should have comment or be unexported (golint)
    • Line 1146: warning: exported method NetView.Render2D should have comment or be unexported (golint)
    • Line 1156: warning: exported var NetViewProps should have comment or be unexported (golint)
    • emergent/esg/rule.go
    • Line 21: warning: don't use underscores in Go names; var KiT_RuleTypes should be KiTRuleTypes (golint)
    • Line 21: warning: exported var KiT_RuleTypes should have comment or be unexported (golint)
    • Line 23: warning: exported method RuleTypes.MarshalJSON should have comment or be unexported (golint)
    • Line 24: warning: exported method RuleTypes.UnmarshalJSON should have comment or be unexported (golint)
    • Line 42: warning: exported const RuleTypesN should have comment (or a comment on this block) or be unexported (golint)
    • Line 179: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • emergent/params/params.go
    • Line 51: warning: don't use underscores in Go names; var KiT_Params should be KiTParams (golint)
    • Line 51: warning: exported var KiT_Params should have comment or be unexported (golint)
    • Line 55: warning: comment on exported type Sel should be of the form "Sel ..." (with optional leading article) (golint)
    • Line 64: warning: don't use underscores in Go names; var KiT_Sel should be KiTSel (golint)
    • Line 64: warning: exported var KiT_Sel should have comment or be unexported (golint)
    • Line 86: warning: don't use underscores in Go names; var KiT_Sheet should be KiTSheet (golint)
    • Line 86: warning: exported var KiT_Sheet should have comment or be unexported (golint)
    • Line 116: warning: don't use underscores in Go names; var KiT_Sheets should be KiTSheets (golint)
    • Line 116: warning: exported var KiT_Sheets should have comment or be unexported (golint)
    • Line 143: warning: don't use underscores in Go names; var KiT_Set should be KiTSet (golint)
    • Line 143: warning: exported var KiT_Set should have comment or be unexported (golint)
    • Line 196: warning: don't use underscores in Go names; var KiT_Sets should be KiTSets (golint)
    • Line 196: warning: exported var KiT_Sets should have comment or be unexported (golint)
    • emergent/prjn/poolrect.go
    • Line 30: warning: exported function NewPoolRect should have comment or be unexported (golint)
    • Line 36: warning: exported method PoolRect.Defaults should have comment or be unexported (golint)
    • Line 42: warning: exported method PoolRect.Name should have comment or be unexported (golint)
    • Line 46: warning: exported method PoolRect.Connect should have comment or be unexported (golint)
    • emergent/prjn/pooltilesub.go
    • Line 44: warning: exported function NewPoolTileSub should have comment or be unexported (golint)
    • Line 58: warning: exported method PoolTileSub.Defaults should have comment or be unexported (golint)
    • Line 74: warning: exported method PoolTileSub.Name should have comment or be unexported (golint)
    • Line 78: warning: exported method PoolTileSub.Connect should have comment or be unexported (golint)
    • Line 155: warning: exported method PoolTileSub.ConnectRecip should have comment or be unexported (golint)
    • Line 241: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 248: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • emergent/env/time.go
    • Line 25: warning: don't use underscores in Go names; var KiT_TimeScales should be KiTTimeScales (golint)
    • Line 25: warning: exported var KiT_TimeScales should have comment or be unexported (golint)
    • Line 27: warning: exported method TimeScales.MarshalJSON should have comment or be unexported (golint)
    • Line 28: warning: exported method TimeScales.UnmarshalJSON should have comment or be unexported (golint)
    • emergent/popcode/popcode1d.go
    • Line 13: warning: exported type PopCodes should have comment or be unexported (golint)
    • Line 23: warning: comment on exported type OneD should be of the form "OneD ..." (with optional leading article) (golint)
    • Line 36: warning: exported method OneD.Defaults should have comment or be unexported (golint)
    • emergent/esg/conds.go
    • Line 26: warning: comment on exported method Conds.Eval should be of the form "Eval ..." (golint)
    • Line 127: warning: comment on exported method Cond.Eval should be of the form "Eval ..." (golint)
    • Line 132: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 170: warning: don't use underscores in Go names; var KiT_CondEls should be KiTCondEls (golint)
    • Line 170: warning: exported var KiT_CondEls should have comment or be unexported (golint)
    • Line 172: warning: exported method CondEls.MarshalJSON should have comment or be unexported (golint)
    • Line 173: warning: exported method CondEls.UnmarshalJSON should have comment or be unexported (golint)
    • Line 178: warning: exported const And should have comment (or a comment on this block) or be unexported (golint)
    • emergent/params/io.go
    • Line 420: warning: exported var ParamsProps should have comment or be unexported (golint)
    • Line 462: warning: exported var SelProps should have comment or be unexported (golint)
    • Line 504: warning: exported var SheetProps should have comment or be unexported (golint)
    • Line 546: warning: exported var SheetsProps should have comment or be unexported (golint)
    • Line 594: warning: exported var SetProps should have comment or be unexported (golint)
    • Line 642: warning: exported var SetsProps should have comment or be unexported (golint)
    • emergent/prjn/full.go
    • Line 16: warning: exported function NewFull should have comment or be unexported (golint)
    • Line 20: warning: exported method Full.Name should have comment or be unexported (golint)
    • Line 24: warning: exported method Full.Connect should have comment or be unexported (golint)
    • emergent/stepper/stepper.go
    • Line 29: warning: exported type RunState should have comment or be unexported (golint)
    • Line 32: warning: exported const Stopped should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: don't use underscores in Go names; var KiT_RunState should be KiTRunState (golint)
    • Line 39: warning: exported var KiT_RunState should have comment or be unexported (golint)
    • Line 88: warning: comment on exported method Stepper.ResetParams should be of the form "ResetParams ..." (golint)
    • Line 180: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • emergent/prjn/rect.go
    • Line 30: warning: exported function NewRect should have comment or be unexported (golint)
    • Line 36: warning: exported method Rect.Defaults should have comment or be unexported (golint)
    • Line 42: warning: exported method Rect.Name should have comment or be unexported (golint)
    • Line 46: warning: exported method Rect.Connect should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.

    • emergent/prjn/pooltile.go
    • Line 83: warning: ineffectual assignment to sNu (ineffassign)
    • Line 84: warning: ineffectual assignment to rNu (ineffassign)
    • Line 148: warning: ineffectual assignment to sNu (ineffassign)
    • Line 149: warning: ineffectual assignment to rNu (ineffassign)

misspell92%

Misspell Finds commonly misspelled English words

    • emergent/prjn/pooltile.go
    • Line 210: warning: "remaing" is a misspelling of "remaining" (misspell)
    • Line 270: warning: "remaing" is a misspelling of "remaining" (misspell)
    • Line 358: warning: "remaing" is a misspelling of "remaining" (misspell)
    • Line 465: warning: "remaing" is a misspelling of "remaining" (misspell)
    • Line 555: warning: "remaing" is a misspelling of "remaining" (misspell)
    • emergent/prjn/pooltilesub.go
    • Line 235: warning: "remaing" is a misspelling of "remaining" (misspell)
    • Line 266: warning: "remaing" is a misspelling of "remaining" (misspell)
    • Line 354: warning: "remaing" is a misspelling of "remaining" (misspell)
    • Line 449: warning: "remaing" is a misspelling of "remaining" (misspell)
    • Line 539: warning: "remaing" is a misspelling of "remaining" (misspell)