Preparing report...

Report for github.com/goki/ki

A+    Excellent!    Found 19 issues across 43 files

Tweet

gofmt97%

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!


gocyclo83%

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.

    • ki/kit/convert.go
    • Line 159: warning: cyclomatic complexity 36 of function ToInt() is high (> 15) (gocyclo)
    • Line 424: warning: cyclomatic complexity 36 of function ToString() is high (> 15) (gocyclo)
    • Line 335: warning: cyclomatic complexity 36 of function ToFloat32() is high (> 15) (gocyclo)
    • Line 247: warning: cyclomatic complexity 36 of function ToFloat() is high (> 15) (gocyclo)
    • Line 89: warning: cyclomatic complexity 29 of function ToBool() is high (> 15) (gocyclo)
    • Line 550: warning: cyclomatic complexity 19 of function SetRobust() is high (> 15) (gocyclo)
    • Line 511: warning: cyclomatic complexity 16 of function ToStringPrec() is high (> 15) (gocyclo)
    • ki/kit/maps.go
    • Line 96: warning: cyclomatic complexity 24 of function MapStructElsValueFun() is high (> 15) (gocyclo)
    • Line 241: warning: cyclomatic complexity 22 of function MapValueSort() is high (> 15) (gocyclo)
    • ki/kit/slices.go
    • Line 318: warning: cyclomatic complexity 22 of function ValueSliceSort() is high (> 15) (gocyclo)
    • Line 69: warning: cyclomatic complexity 22 of function SliceSort() is high (> 15) (gocyclo)
    • Line 187: warning: cyclomatic complexity 22 of function StructSliceSort() is high (> 15) (gocyclo)
    • ki/ki/node.go
    • Line 1105: warning: cyclomatic complexity 20 of function (*Node).FuncDownMeFirst() is high (> 15) (gocyclo)
    • Line 1191: warning: cyclomatic complexity 20 of function (*Node).FuncDownMeLast() is high (> 15) (gocyclo)
    • ki/ki/props.go
    • Line 259: warning: cyclomatic complexity 18 of function (*Props).UnmarshalJSON() is high (> 15) (gocyclo)

golint69%

Golint is a linter for Go source code.

    • ki/ki/node.go
    • Line 46: warning: comment on exported var KiT_Node should be of the form "KiT_Node ..." (golint)
    • Line 51: warning: don't use underscores in Go names; var KiT_Node should be KiTNode (golint)
    • ki/ki/signal.go
    • Line 101: warning: don't use underscores in Go names; var KiT_Signal should be KiTSignal (golint)
    • Line 101: warning: exported var KiT_Signal should have comment or be unexported (golint)
    • ki/ki/version.go
    • Line 6: warning: exported const Version should have comment (or a comment on this block) or be unexported (golint)
    • ki/atomctr/atomctr.go
    • Line 16: warning: comment on exported method Ctr.Add should be of the form "Add ..." (golint)
    • Line 21: warning: comment on exported method Ctr.Sub should be of the form "Sub ..." (golint)
    • Line 26: warning: comment on exported method Ctr.Inc should be of the form "Inc ..." (golint)
    • Line 31: warning: comment on exported method Ctr.Dec should be of the form "Dec ..." (golint)
    • Line 36: warning: comment on exported method Ctr.Value should be of the form "Value ..." (golint)
    • Line 41: warning: comment on exported method Ctr.Set should be of the form "Set ..." (golint)
    • Line 46: warning: comment on exported method Ctr.Swap should be of the form "Swap ..." (golint)
    • ki/floats/floats.go
    • Line 5: warning: package comment should be of the form "Package floats ..." (golint)
    • Line 5: warning: package comment should not have leading space (golint)
    • Line 32: warning: exported function Abs should have comment or be unexported (golint)
    • Line 35: warning: exported function Acos should have comment or be unexported (golint)
    • Line 38: warning: exported function Acosh should have comment or be unexported (golint)
    • Line 41: warning: exported function Asin should have comment or be unexported (golint)
    • Line 44: warning: exported function Asinh should have comment or be unexported (golint)
    • Line 47: warning: exported function Atan should have comment or be unexported (golint)
    • Line 50: warning: exported function Atan2 should have comment or be unexported (golint)
    • Line 53: warning: exported function Atanh should have comment or be unexported (golint)
    • Line 56: warning: exported function Cbrt should have comment or be unexported (golint)
    • Line 59: warning: exported function Ceil should have comment or be unexported (golint)
    • Line 62: warning: exported function Copysign should have comment or be unexported (golint)
    • Line 65: warning: exported function Cos should have comment or be unexported (golint)
    • Line 68: warning: exported function Cosh should have comment or be unexported (golint)
    • Line 71: warning: exported function Dim should have comment or be unexported (golint)
    • Line 74: warning: exported function Erf should have comment or be unexported (golint)
    • Line 77: warning: exported function Erfc should have comment or be unexported (golint)
    • Line 80: warning: exported function Erfcinv should have comment or be unexported (golint)
    • Line 83: warning: exported function Erfinv should have comment or be unexported (golint)
    • Line 86: warning: exported function Exp should have comment or be unexported (golint)
    • Line 89: warning: exported function Exp2 should have comment or be unexported (golint)
    • Line 92: warning: exported function Expm1 should have comment or be unexported (golint)
    • Line 95: warning: exported function Floor should have comment or be unexported (golint)
    • Line 98: warning: exported function Frexp should have comment or be unexported (golint)
    • Line 101: warning: exported function Gamma should have comment or be unexported (golint)
    • Line 104: warning: exported function Hypot should have comment or be unexported (golint)
    • Line 107: warning: exported function Ilogb should have comment or be unexported (golint)
    • Line 110: warning: exported function IsInf should have comment or be unexported (golint)
    • Line 113: warning: exported function IsNaN should have comment or be unexported (golint)
    • Line 116: warning: exported function J0 should have comment or be unexported (golint)
    • Line 119: warning: exported function J1 should have comment or be unexported (golint)
    • Line 122: warning: exported function Jn should have comment or be unexported (golint)
    • Line 125: warning: exported function Ldexp should have comment or be unexported (golint)
    • Line 128: warning: exported function Lgamma should have comment or be unexported (golint)
    • Line 131: warning: exported function Log should have comment or be unexported (golint)
    • Line 134: warning: exported function Log10 should have comment or be unexported (golint)
    • Line 137: warning: exported function Log1p should have comment or be unexported (golint)
    • Line 140: warning: exported function Log2 should have comment or be unexported (golint)
    • Line 143: warning: exported function Logb should have comment or be unexported (golint)
    • Line 146: warning: exported function Max should have comment or be unexported (golint)
    • Line 149: warning: exported function Min should have comment or be unexported (golint)
    • Line 152: warning: exported function Mod should have comment or be unexported (golint)
    • Line 155: warning: exported function Modf should have comment or be unexported (golint)
    • Line 158: warning: exported function Nextafter should have comment or be unexported (golint)
    • Line 161: warning: exported function Pow should have comment or be unexported (golint)
    • Line 164: warning: exported function Remainder should have comment or be unexported (golint)
    • Line 167: warning: exported function Round should have comment or be unexported (golint)
    • Line 170: warning: exported function RoundToEven should have comment or be unexported (golint)
    • Line 173: warning: exported function Signbit should have comment or be unexported (golint)
    • Line 176: warning: exported function Sin should have comment or be unexported (golint)
    • Line 179: warning: exported function Sincos should have comment or be unexported (golint)
    • Line 182: warning: exported function Sinh should have comment or be unexported (golint)
    • Line 185: warning: exported function Sqrt should have comment or be unexported (golint)
    • Line 188: warning: exported function Tan should have comment or be unexported (golint)
    • Line 191: warning: exported function Tanh should have comment or be unexported (golint)
    • Line 194: warning: exported function Trunc should have comment or be unexported (golint)
    • Line 197: warning: exported function Y0 should have comment or be unexported (golint)
    • Line 200: warning: exported function Y1 should have comment or be unexported (golint)
    • Line 203: warning: exported function Yn should have comment or be unexported (golint)
    • ki/kit/enums.go
    • Line 234: warning: comment on exported method EnumRegistry.Properties should be of the form "Properties ..." (golint)
    • Line 689: warning: exported function EnumMarshalJSON should have comment or be unexported (golint)
    • Line 702: warning: exported function EnumUnmarshalJSON should have comment or be unexported (golint)
    • Line 716: warning: exported function EnumMarshalText should have comment or be unexported (golint)
    • Line 727: warning: exported function EnumUnmarshalText should have comment or be unexported (golint)
    • Line 748: warning: exported const TestFlagsNil should have comment (or a comment on this block) or be unexported (golint)
    • Line 756: warning: don't use underscores in Go names; var KiT_TestFlags should be KiTTestFlags (golint)
    • Line 756: warning: exported var KiT_TestFlags should have comment or be unexported (golint)
    • Line 758: warning: exported method TestFlags.MarshalJSON should have comment or be unexported (golint)
    • Line 759: warning: exported method TestFlags.UnmarshalJSON should have comment or be unexported (golint)
    • ki/ki/flags.go
    • Line 15: warning: don't use underscores in Go names; var KiT_Flags should be KiTFlags (golint)
    • Line 15: warning: exported var KiT_Flags should have comment or be unexported (golint)
    • ki/ki/node_test.go
    • Line 30: warning: don't use underscores in Go names; var KiT_NodeEmbed should be KiTNodeEmbed (golint)
    • Line 37: warning: don't use underscores in Go names; var KiT_NodeField should be KiTNodeField (golint)
    • Line 45: warning: don't use underscores in Go names; var KiT_NodeField2 should be KiTNodeField2 (golint)
    • Line 1037: warning: don't use underscores in Go names; var TestGUITree_NodeEmbed should be TestGUITreeNodeEmbed (golint)
    • Line 1038: warning: don't use underscores in Go names; var TestGUITree_NodeField should be TestGUITreeNodeField (golint)
    • Line 1039: warning: don't use underscores in Go names; var TestGUITree_NodeField2 should be TestGUITreeNodeField2 (golint)
    • ki/ki/props.go
    • Line 22: warning: don't use underscores in Go names; var KiT_Props should be KiTProps (golint)
    • Line 22: warning: exported var KiT_Props should have comment or be unexported (golint)
    • Line 24: warning: exported var PropsProps should have comment or be unexported (golint)
    • Line 173: warning: receiver name dest should be consistent with previous receiver name pr for Props (golint)
    • Line 180: warning: receiver name dest should be consistent with previous receiver name ps for PropSlice (golint)
    • Line 210: warning: receiver name p should be consistent with previous receiver name pr for Props (golint)
    • Line 259: warning: receiver name p should be consistent with previous receiver name pr for Props (golint)
    • ki/kit/convert.go
    • Line 686: warning: exported function Max32 should have comment or be unexported (golint)
    • Line 693: warning: exported function Min32 should have comment or be unexported (golint)
    • Line 700: warning: comment on exported function MinPos should be of the form "MinPos ..." (golint)
    • Line 712: warning: comment on exported function MinPos32 should be of the form "MinPos32 ..." (golint)
    • ki/kit/embeds.go
    • Line 164: warning: comment on exported function FlatFieldVals should be of the form "FlatFieldVals ..." (golint)
    • ki/kit/embeds_test.go
    • Line 70: warning: don't use underscores in Go names; var a_in_a should be aInA (golint)
    • Line 73: warning: don't use underscores in Go names; var b_in_a should be bInA (golint)
    • Line 76: warning: don't use underscores in Go names; var a_in_b should be aInB (golint)
    • Line 79: warning: don't use underscores in Go names; var a_in_c should be aInC (golint)
    • Line 87: warning: don't use underscores in Go names; var aif_in_c should be aifInC (golint)
    • Line 90: warning: don't use underscores in Go names; var aif_in_d should be aifInD (golint)
    • ki/kit/typeandname.go
    • Line 13: warning: comment on exported type TypeAndName should be of the form "TypeAndName ..." (with optional leading article) (golint)
    • Line 20: warning: comment on exported type TypeAndNameList should be of the form "TypeAndNameList ..." (with optional leading article) (golint)
    • Line 23: warning: comment on exported method TypeAndNameList.SetFromString should be of the form "SetFromString ..." (golint)
    • Line 44: warning: exported method TypeAndNameList.Add should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.

    • ki/ki/io.go
    • Line 156: warning: ineffectual assignment to err (ineffassign)
    • Line 217: warning: ineffectual assignment to err (ineffassign)
    • Line 531: warning: ineffectual assignment to err (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!