Preparing report...

Report for github.com/made2591/go-perceptron-go

D    Needs lots of improvement    Found 8 issues across 8 files

Tweet

gofmt0%

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!


golint12%

Golint is a linter for Go source code.

    • go-perceptron-go/model/neural/neuronUnit.go
    • Line 1: warning: package comment should be of the form "Package neural ..." (golint)
    • Line 19: warning: exported const SCALING_FACTOR should have comment (or a comment on this block) or be unexported (golint)
    • Line 55: warning: should omit 2nd value from range; this loop is equivalent to `for index := range ...` (golint)
    • Line 88: warning: should omit 2nd value from range; this loop is equivalent to `for index := range ...` (golint)
    • go-perceptron-go/model/neural/pattern.go
    • Line 1: warning: package comment should be of the form "Package neural ..." (golint)
    • Line 43: warning: error should be the last type when returning multiple items (golint)
    • Line 155: warning: should omit 2nd value from range; this loop is equivalent to `for index := range ...` (golint)
    • go-perceptron-go/model/neural/transferFunction.go
    • Line 1: warning: package comment should be of the form "Package neural ..." (golint)
    • Line 15: warning: exported function HeavysideTransfer should have comment or be unexported (golint)
    • Line 24: warning: exported function HeavysideTransferDerivate should have comment or be unexported (golint)
    • Line 30: warning: exported function SigmoidalTransfer should have comment or be unexported (golint)
    • Line 36: warning: exported function SigmoidalTransferDerivate should have comment or be unexported (golint)
    • Line 42: warning: exported function HyperbolicTransfer should have comment or be unexported (golint)
    • Line 48: warning: exported function HyperbolicTransferDerivate should have comment or be unexported (golint)
    • go-perceptron-go/util/util.go
    • Line 1: warning: package comment should be of the form "Package util ..." (golint)
    • Line 134: warning: exported function GenerateRandomIntWithBinaryDim should have comment or be unexported (golint)
    • Line 141: warning: exported function GenerateRandomBinaryInt should have comment or be unexported (golint)
    • Line 148: warning: don't use underscores in Go names; var z_index should be zIndex (golint)
    • Line 163: warning: exported function ConvertIntToBinary should have comment or be unexported (golint)
    • Line 173: warning: don't use underscores in Go names; var z_index should be zIndex (golint)
    • Line 184: warning: exported function ConvertBinToInt should have comment or be unexported (golint)
    • Line 196: warning: exported function Round should have comment or be unexported (golint)
    • go-perceptron-go/validation/validation.go
    • Line 58: warning: comment on exported function TrainTestPatternSplit should be of the form "TrainTestPatternSplit ..." (golint)
    • Line 218: warning: comment on exported function KFoldValidation should be of the form "KFoldValidation ..." (golint)
    • Line 288: warning: comment on exported function MLPRandomSubsamplingValidation should be of the form "MLPRandomSubsamplingValidation ..." (golint)
    • Line 309: warning: don't use underscores in Go names; var o_out should be oOut (golint)
    • Line 352: warning: comment on exported function MLPKFoldValidation should be of the form "MLPKFoldValidation ..." (golint)
    • Line 384: warning: don't use underscores in Go names; var o_out should be oOut (golint)
    • Line 437: warning: don't use underscores in Go names; var p_cor should be pCor (golint)
    • Line 440: warning: don't use underscores in Go names; range var p_i should be pI (golint)
    • Line 442: warning: don't use underscores in Go names; var o_out should be oOut (golint)
    • Line 443: warning: don't use underscores in Go names; range var o_out_i should be oOutI (golint)
    • Line 443: warning: don't use underscores in Go names; range var o_out_v should be oOutV (golint)
    • go-perceptron-go/model/neural/multiLayerNetwork.go
    • Line 1: warning: package comment should be of the form "Package neural ..." (golint)
    • Line 26: warning: exported type MultiLayerNetwork should have comment or be unexported (golint)
    • Line 29: warning: don't use underscores in Go names; struct field L_rate should be LRate (golint)
    • Line 35: warning: don't use underscores in Go names; struct field T_func should be TFunc (golint)
    • Line 38: warning: don't use underscores in Go names; struct field T_func_d should be TFuncD (golint)
    • Line 228: warning: comment on exported function BackPropagate should be of the form "BackPropagate ..." (golint)
    • Line 341: warning: should omit 2nd value from range; this loop is equivalent to `for io := range ...` (golint)
    • Line 379: warning: don't use underscores in Go names; var p_i_r should be pIR (golint)
    • Line 382: warning: don't use underscores in Go names; range var p_i should be pI (golint)
    • Line 390: warning: don't use underscores in Go names; var o_out should be oOut (golint)
    • Line 391: warning: don't use underscores in Go names; range var o_out_i should be oOutI (golint)
    • Line 391: warning: don't use underscores in Go names; range var o_out_v should be oOutV (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign50%

IneffAssign detects ineffectual assignments in Go code.

    • go-perceptron-go/main.go
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 14: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/made2591/go-perceptron-go/model/neural (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/made2591/go-perceptron-go/util (invalid package name: "") (ineffassign)
    • Line 14: warning: could not import github.com/made2591/go-perceptron-go/validation (invalid package name: "") (ineffassign)
    • go-perceptron-go/model/neural/multiLayerNetwork.go
    • Line 13: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 13: warning: could not import github.com/made2591/go-perceptron-go/util (invalid package name: "") (ineffassign)
    • go-perceptron-go/validation/validation.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 12: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/sirupsen/logrus (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/made2591/go-perceptron-go/model/neural (invalid package name: "") (ineffassign)
    • Line 12: warning: could not import github.com/made2591/go-perceptron-go/util (invalid package name: "") (ineffassign)

misspell87%

Misspell Finds commonly misspelled English words