Preparing report...

Report for github.com/rai-project/go-mxnet

B    Not bad!    Found 12 issues across 15 files

Tweet

gofmt73%

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!


gocyclo86%

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.


golint26%

Golint is a linter for Go source code.

    • go-mxnet/examples/batch_mlmodelscope/main.go
    • Line 42: warning: don't use underscores in Go names; var graph_url should be graphURL (golint)
    • Line 43: warning: don't use underscores in Go names; var weights_url should be weightsURL (golint)
    • Line 44: warning: don't use underscores in Go names; var synset_url should be synsetURL (golint)
    • go-mxnet/mxnet/graph.go
    • Line 15: warning: exported type GraphNode should have comment or be unexported (golint)
    • Line 23: warning: exported type Graph should have comment or be unexported (golint)
    • Line 32: warning: exported function NewGraph should have comment or be unexported (golint)
    • Line 47: warning: exported method GraphNode.ID should have comment or be unexported (golint)
    • Line 51: warning: exported method Graph.ID should have comment or be unexported (golint)
    • Line 55: warning: exported method Graph.TopologicallySortedNodes should have comment or be unexported (golint)
    • go-mxnet/mxnet/ndarray.go
    • Line 15: warning: comment on exported type NDList should be of the form "NDList ..." (with optional leading article) (golint)
    • Line 21: warning: comment on exported type NDItem should be of the form "NDItem ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported function CreateNDListFromFile should be of the form "CreateNDListFromFile ..." (golint)
    • Line 64: warning: comment on exported function CreateNDListFromBytes should be of the form "CreateNDListFromBytes ..." (golint)
    • Line 96: warning: comment on exported method NDList.Get should be of the form "Get ..." (golint)
    • Line 135: warning: comment on exported method NDList.Free should be of the form "Free ..." (golint)
    • go-mxnet/mxnet/types.go
    • Line 13: warning: exported type DeviceType should have comment or be unexported (golint)
    • Line 16: warning: exported const CPU_DEVICE should have comment (or a comment on this block) or be unexported (golint)
    • go-mxnet/examples/batch_nvprof/main.go
    • Line 44: warning: don't use underscores in Go names; var graph_url should be graphURL (golint)
    • Line 45: warning: don't use underscores in Go names; var weights_url should be weightsURL (golint)
    • Line 46: warning: don't use underscores in Go names; var synset_url should be synsetURL (golint)
    • go-mxnet/mxnet/predictor.go
    • Line 24: warning: comment on exported type Predictor should be of the form "Predictor ..." (with optional leading article) (golint)
    • Line 39: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 131: warning: exported method Predictor.GetOptions should have comment or be unexported (golint)
    • Line 135: warning: comment on exported method Predictor.SetInput should be of the form "SetInput ..." (golint)
    • Line 157: warning: comment on exported method Predictor.Forward should be of the form "Forward ..." (golint)
    • Line 167: warning: exported method Predictor.Predict should have comment or be unexported (golint)
    • Line 256: warning: comment on exported method Predictor.GetOutputShape should be of the form "GetOutputShape ..." (golint)
    • Line 282: warning: exported method Predictor.ReadPredictionOutputAtIndex should have comment or be unexported (golint)
    • Line 309: warning: comment on exported method Predictor.ReadPredictionOutputs should be of the form "ReadPredictionOutputs ..." (golint)
    • Line 340: warning: comment on exported method Predictor.Close should be of the form "Close ..." (golint)
    • go-mxnet/mxnet/profile.go
    • Line 35: warning: exported type Profile should have comment or be unexported (golint)
    • Line 48: warning: comment on exported type ProfileMode should be of the form "ProfileMode ..." (with optional leading article) (golint)
    • Line 67: warning: comment on exported function NewProfile should be of the form "NewProfile ..." (golint)
    • Line 125: warning: comment on exported method Profile.Start should be of the form "Start ..." (golint)
    • Line 140: warning: comment on exported method Profile.Stop should be of the form "Stop ..." (golint)
    • Line 164: warning: comment on exported method Profile.Pause should be of the form "Pause ..." (golint)
    • Line 187: warning: comment on exported method Profile.Resume should be of the form "Resume ..." (golint)
    • Line 210: warning: comment on exported method Profile.Dump should be of the form "Dump ..." (golint)
    • Line 371: warning: exported method Profile.Delete should have comment or be unexported (golint)
    • Line 378: warning: exported method Profile.Publish should have comment or be unexported (golint)
    • Line 426: warning: exported function WaitAll should have comment or be unexported (golint)
    • go-mxnet/utils/utils.go
    • Line 8: warning: comment on exported function CvtImageTo1DArray should be of the form "CvtImageTo1DArray ..." (golint)
    • Line 31: warning: exported function CvtImageTo2DArray should have comment or be unexported (golint)
    • Line 53: warning: comment on exported function CvtImageTo1DArrayMean should be of the form "CvtImageTo1DArrayMean ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell73%

Misspell Finds commonly misspelled English words