Preparing report...

Report for github.com/RedisAI/redisai-go

A+    Excellent!    Found 11 issues across 19 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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!


gocyclo94%

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.


golint47%

Golint is a linter for Go source code.

    • redisai-go/redisai/implementations/AITensor.go
    • Line 5: warning: comment on exported type AITensor should be of the form "AITensor ..." (with optional leading article) (golint)
    • Line 14: warning: exported method AITensor.Dtype should have comment or be unexported (golint)
    • Line 18: warning: exported function NewAiTensor should have comment or be unexported (golint)
    • Line 22: warning: exported method AITensor.NumDims should have comment or be unexported (golint)
    • Line 26: warning: exported method AITensor.Len should have comment or be unexported (golint)
    • Line 34: warning: exported method AITensor.Shape should have comment or be unexported (golint)
    • Line 34: warning: receiver name m should be consistent with previous receiver name t for AITensor (golint)
    • Line 38: warning: exported method AITensor.SetShape should have comment or be unexported (golint)
    • Line 38: warning: receiver name m should be consistent with previous receiver name t for AITensor (golint)
    • Line 42: warning: exported function NewAiTensorWithShape should have comment or be unexported (golint)
    • Line 46: warning: exported function NewAiTensorWithData should have comment or be unexported (golint)
    • Line 52: warning: exported method AITensor.SetData should have comment or be unexported (golint)
    • Line 52: warning: receiver name m should be consistent with previous receiver name t for AITensor (golint)
    • Line 56: warning: exported method AITensor.Data should have comment or be unexported (golint)
    • Line 56: warning: receiver name m should be consistent with previous receiver name t for AITensor (golint)
    • redisai-go/redisai/client.go
    • Line 43: warning: comment on exported const TensorContentTypeBlob should be of the form "TensorContentTypeBlob ..." (golint)
    • Line 46: warning: comment on exported const TensorContentTypeValues should be of the form "TensorContentTypeValues ..." (golint)
    • Line 49: warning: comment on exported const TensorContentTypeMeta should be of the form "TensorContentTypeMeta ..." (golint)
    • Line 53: warning: exported type AiClient should have comment or be unexported (golint)
    • Line 111: warning: exported method Client.ActiveConnNX should have comment or be unexported (golint)
    • Line 117: warning: exported method Client.Pipeline should have comment or be unexported (golint)
    • Line 123: warning: exported method Client.DisablePipeline should have comment or be unexported (golint)
    • Line 130: warning: exported method Client.Flush should have comment or be unexported (golint)
    • Line 146: warning: exported method Client.SendAndIncr should have comment or be unexported (golint)
    • Line 166: warning: exported method Client.DoOrSend should have comment or be unexported (golint)
    • redisai-go/redisai/client_test.go
    • Line 35: warning: don't use underscores in Go names; func result tls_cert should be tlsCert (golint)
    • Line 35: warning: don't use underscores in Go names; func result tls_key should be tlsKey (golint)
    • Line 35: warning: don't use underscores in Go names; func result tls_cacert should be tlsCacert (golint)
    • redisai-go/redisai/dag.go
    • Line 15: warning: exported type Dag should have comment or be unexported (golint)
    • Line 19: warning: exported function NewDag should have comment or be unexported (golint)
    • Line 25: warning: exported method Dag.TensorSet should have comment or be unexported (golint)
    • Line 35: warning: exported method Dag.TensorGet should have comment or be unexported (golint)
    • Line 40: warning: exported method Dag.ModelRun should have comment or be unexported (golint)
    • Line 48: warning: exported method Dag.FlatArgs should have comment or be unexported (golint)
    • Line 57: warning: exported method Dag.ParseReply should have comment or be unexported (golint)
    • redisai-go/redisai/implementations/AIModel.go
    • Line 5: warning: exported type AIModel should have comment or be unexported (golint)
    • Line 16: warning: exported method AIModel.Outputs should have comment or be unexported (golint)
    • Line 20: warning: exported method AIModel.SetOutputs should have comment or be unexported (golint)
    • Line 24: warning: exported method AIModel.Inputs should have comment or be unexported (golint)
    • Line 28: warning: exported method AIModel.SetInputs should have comment or be unexported (golint)
    • Line 32: warning: exported method AIModel.Blob should have comment or be unexported (golint)
    • Line 36: warning: exported method AIModel.SetBlob should have comment or be unexported (golint)
    • Line 40: warning: exported method AIModel.Device should have comment or be unexported (golint)
    • Line 44: warning: exported method AIModel.SetDevice should have comment or be unexported (golint)
    • Line 48: warning: exported method AIModel.Backend should have comment or be unexported (golint)
    • Line 52: warning: exported method AIModel.SetBackend should have comment or be unexported (golint)
    • Line 56: warning: exported method AIModel.Tag should have comment or be unexported (golint)
    • Line 60: warning: exported method AIModel.SetTag should have comment or be unexported (golint)
    • Line 64: warning: exported method AIModel.BatchSize should have comment or be unexported (golint)
    • Line 68: warning: exported method AIModel.SetBatchSize should have comment or be unexported (golint)
    • Line 72: warning: exported method AIModel.MinBatchSize should have comment or be unexported (golint)
    • Line 76: warning: exported method AIModel.SetMinBatchSize should have comment or be unexported (golint)
    • Line 80: warning: exported function NewModel should have comment or be unexported (golint)
    • Line 84: warning: exported function NewEmptyModel should have comment or be unexported (golint)
    • Line 88: warning: exported method AIModel.SetBlobFromFile should have comment or be unexported (golint)
    • redisai-go/redisai/commands.go
    • Line 17: warning: comment on exported method Client.TensorSetFromTensor should be of the form "TensorSetFromTensor ..." (golint)
    • Line 24: warning: exported method Client.TensorGet should have comment or be unexported (golint)
    • Line 36: warning: exported method Client.TensorGetToTensor should have comment or be unexported (golint)
    • Line 59: warning: comment on exported method Client.TensorGetMeta should be of the form "TensorGetMeta ..." (golint)
    • Line 71: warning: comment on exported method Client.TensorGetBlob should be of the form "TensorGetBlob ..." (golint)
    • Line 91: warning: comment on exported method Client.ModelSetFromModel should be of the form "ModelSetFromModel ..." (golint)
    • Line 116: warning: exported method Client.ModelGetToModel should have comment or be unexported (golint)
    • Line 127: warning: exported method Client.ModelDel should have comment or be unexported (golint)
    • Line 141: warning: don't use underscores in Go names; method parameter script_source should be scriptSource (golint)
    • Line 148: warning: don't use underscores in Go names; method parameter script_source should be scriptSource (golint)
    • Line 154: warning: exported method Client.ScriptGet should have comment or be unexported (golint)
    • Line 164: warning: exported method Client.ScriptDel should have comment or be unexported (golint)
    • Line 177: warning: exported method Client.LoadBackend should have comment or be unexported (golint)
    • Line 177: warning: don't use underscores in Go names; method parameter backend_identifier should be backendIdentifier (golint)
    • Line 183: warning: comment on exported method Client.Info should be of the form "Info ..." (golint)
    • Line 209: warning: comment on exported method Client.ResetStat should be of the form "ResetStat ..." (golint)
    • Line 214: warning: comment on exported method Client.DagRun should be of the form "DagRun ..." (golint)
    • Line 225: warning: comment on exported method Client.DagRunRO should be of the form "DagRunRO ..." (golint)
    • Line 253: warning: comment on exported method Client.SetBackendsPath should be of the form "SetBackendsPath ..." (golint)
    • redisai-go/redisai/tensor.go
    • Line 32: warning: exported function TensorGetTypeStrFromType should have comment or be unexported (golint)
    • Line 129: warning: exported function ProcessTensorReplyValues should have comment or be unexported (golint)
    • Line 151: warning: error should be the last type when returning multiple items (golint)
    • Line 151: warning: exported function ProcessTensorGetReply should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign89%

IneffAssign detects ineffectual assignments in Go code.

    • redisai-go/redisai/commands_test.go
    • Line 116: warning: ineffectual assignment to err (ineffassign)
    • Line 575: warning: ineffectual assignment to err (ineffassign)
    • Line 623: warning: ineffectual assignment to err (ineffassign)
    • Line 636: warning: ineffectual assignment to err (ineffassign)
    • Line 870: warning: ineffectual assignment to err (ineffassign)
    • Line 883: warning: ineffectual assignment to err (ineffassign)
    • Line 888: warning: ineffectual assignment to err (ineffassign)
    • Line 890: warning: ineffectual assignment to err (ineffassign)
    • Line 894: warning: ineffectual assignment to ret (ineffassign)
    • Line 906: warning: ineffectual assignment to err (ineffassign)

misspell94%

Misspell Finds commonly misspelled English words