Preparing report...

Report for github.com/steve0hh/midas

C    Needs some work    Found 5 issues across 7 files

Tweet

gofmt28%

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!


gocyclo100%

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.

No problems detected. Good job!


golint42%

Golint is a linter for Go source code.

    • midas/nodehash.go
    • Line 5: warning: exported type NodeHash should have comment or be unexported (golint)
    • Line 13: warning: exported function NewNodeHash should have comment or be unexported (golint)
    • Line 16: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 29: warning: exported method NodeHash.Hash should have comment or be unexported (golint)
    • Line 33: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 38: warning: exported method NodeHash.Insert should have comment or be unexported (golint)
    • Line 45: warning: exported method NodeHash.GetCount should have comment or be unexported (golint)
    • Line 55: warning: exported method NodeHash.Clear should have comment or be unexported (golint)
    • Line 57: warning: should omit 2nd value from range; this loop is equivalent to `for j := range ...` (golint)
    • Line 63: warning: exported method NodeHash.Lower should have comment or be unexported (golint)
    • Line 65: warning: should omit 2nd value from range; this loop is equivalent to `for j := range ...` (golint)
    • midas/edgehash.go
    • Line 8: warning: exported type EdgeHash should have comment or be unexported (golint)
    • Line 19: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 25: warning: exported function NewEdgeHash should have comment or be unexported (golint)
    • Line 27: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 41: warning: exported method EdgeHash.Hash should have comment or be unexported (golint)
    • Line 45: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 50: warning: exported method EdgeHash.Insert should have comment or be unexported (golint)
    • Line 57: warning: exported method EdgeHash.GetCount should have comment or be unexported (golint)
    • Line 68: warning: exported method EdgeHash.Clear should have comment or be unexported (golint)
    • Line 70: warning: should omit 2nd value from range; this loop is equivalent to `for j := range ...` (golint)
    • Line 76: warning: exported method EdgeHash.Lower should have comment or be unexported (golint)
    • Line 78: warning: should omit 2nd value from range; this loop is equivalent to `for j := range ...` (golint)
    • midas/midas.go
    • Line 25: warning: exported type MidasModel should have comment or be unexported (golint)
    • Line 31: warning: comment on exported function NewMidasModel should be of the form "NewMidasModel ..." (golint)
    • Line 52: warning: comment on exported method MidasModel.FitPredict should be of the form "FitPredict ..." (golint)
    • Line 67: warning: comment on exported function Midas should be of the form "Midas ..." (golint)
    • Line 75: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • midas/midasr.go
    • Line 13: warning: exported type MidasRModel should have comment or be unexported (golint)
    • Line 24: warning: exported function NewMidasRModel should have comment or be unexported (golint)
    • Line 37: warning: exported method MidasRModel.Fit should have comment or be unexported (golint)
    • Line 52: warning: exported method MidasRModel.FitPredict should have comment or be unexported (golint)
    • Line 61: warning: exported function MidasR should have comment or be unexported (golint)
    • Line 76: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!