Preparing report...

Report for github.com/c3sr/tensorflow

A+    Excellent!    Found 19 issues across 33 files

Tweet

gofmt90%

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!


golint48%

Golint is a linter for Go source code.

    • tensorflow/predictor/image_instance_segmentation_predictor.go
    • Line 22: warning: exported type InstanceSegmentationPredictor should have comment or be unexported (golint)
    • Line 35: warning: exported function NewInstanceSegmentationPredictor should have comment or be unexported (golint)
    • Line 54: warning: exported method InstanceSegmentationPredictor.Load should have comment or be unexported (golint)
    • Line 54: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 182: warning: exported method InstanceSegmentationPredictor.Modality should have comment or be unexported (golint)
    • tensorflow/register.go
    • Line 11: warning: exported var FrameworkManifest should have comment or be unexported (golint)
    • Line 36: warning: exported function Register should have comment or be unexported (golint)
    • tensorflow/predictor/image_object_detection_predictor.go
    • Line 23: warning: exported type ObjectDetectionPredictor should have comment or be unexported (golint)
    • Line 35: warning: exported function NewObjectDetectionPredictor should have comment or be unexported (golint)
    • Line 54: warning: exported method ObjectDetectionPredictor.Load should have comment or be unexported (golint)
    • Line 54: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 191: warning: exported method ObjectDetectionPredictor.Modality should have comment or be unexported (golint)
    • tensorflow/predictor/image_predictor.go
    • Line 25: warning: exported type ImagePredictor should have comment or be unexported (golint)
    • Line 32: warning: exported method ImagePredictor.GetInputLayerName should have comment or be unexported (golint)
    • Line 57: warning: exported method ImagePredictor.GetOutputLayerName should have comment or be unexported (golint)
    • Line 80: warning: exported method ImagePredictor.GetOutputParameter should have comment or be unexported (golint)
    • Line 91: warning: exported method ImagePredictor.Close should have comment or be unexported (golint)
    • Line 99: warning: exported method ImagePredictor.Load should have comment or be unexported (golint)
    • tensorflow/predictor/trace.go
    • Line 24: warning: exported type Trace should have comment or be unexported (golint)
    • Line 28: warning: comment on exported function NewTrace should be of the form "NewTrace ..." (golint)
    • Line 76: warning: comment on exported method Trace.Publish should be of the form "Publish ..." (golint)
    • tensorflow/predictor/tf_private.go
    • Line 15: warning: don't use underscores in Go names; func tensor_newTensorFromC should be tensorNewTensorFromC (golint)
    • Line 26: warning: don't use underscores in Go names; var field_c should be fieldC (golint)
    • Line 29: warning: don't use underscores in Go names; var field_shape should be fieldShape (golint)
    • Line 36: warning: don't use underscores in Go names; func tensor_finalize should be tensorFinalize (golint)
    • tensorflow/predictor/alias.go
    • Line 7: warning: exported type Graph should have comment or be unexported (golint)
    • Line 8: warning: exported type Output should have comment or be unexported (golint)
    • Line 9: warning: exported type Tensor should have comment or be unexported (golint)
    • Line 10: warning: exported type Operation should have comment or be unexported (golint)
    • tensorflow/predictor/image_enhancement_predictor.go
    • Line 22: warning: exported type ImageEnhancementPredictor should have comment or be unexported (golint)
    • Line 29: warning: exported function NewImageEnhancementPredictor should have comment or be unexported (golint)
    • Line 48: warning: exported method ImageEnhancementPredictor.Load should have comment or be unexported (golint)
    • Line 48: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 143: warning: exported method ImageEnhancementPredictor.Modality should have comment or be unexported (golint)
    • tensorflow/predictor/reshape.go
    • Line 11: warning: exported type ElementType should have comment or be unexported (golint)
    • Line 32: warning: exported function ElementTypeSliceToTensor should have comment or be unexported (golint)
    • tensorflow/predictor/raw_predictor.go
    • Line 27: warning: exported type RawPredictor should have comment or be unexported (golint)
    • Line 37: warning: exported function NewRawPredictor should have comment or be unexported (golint)
    • Line 45: warning: exported method RawPredictor.Load should have comment or be unexported (golint)
    • Line 370: warning: exported method RawPredictor.Modality should have comment or be unexported (golint)
    • Line 392: warning: exported method RawPredictor.Close should have comment or be unexported (golint)
    • tensorflow/graph/graph.go
    • Line 15: warning: exported var Categories should have comment or be unexported (golint)
    • Line 68: warning: exported var OpInfo should have comment or be unexported (golint)
    • Line 70: warning: exported type TensorInfo should have comment or be unexported (golint)
    • Line 79: warning: exported type Graph should have comment or be unexported (golint)
    • Line 85: warning: exported function New should have comment or be unexported (golint)
    • Line 179: warning: exported method Graph.LookUpNodeOperatorName should have comment or be unexported (golint)
    • Line 195: warning: exported method Graph.MarshalJSON should have comment or be unexported (golint)
    • tensorflow/graph/type.go
    • Line 11: warning: exported const Unknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 84: warning: exported method DataType.ByteCount should have comment or be unexported (golint)
    • Line 132: warning: exported function GetDataType should have comment or be unexported (golint)
    • tensorflow/predictor/gen-reshape.go
    • Line 30: warning: exported function Uint8SliceToTensor should have comment or be unexported (golint)
    • Line 71: warning: exported function Uint16SliceToTensor should have comment or be unexported (golint)
    • Line 112: warning: exported function Uint32SliceToTensor should have comment or be unexported (golint)
    • Line 153: warning: exported function Uint64SliceToTensor should have comment or be unexported (golint)
    • Line 194: warning: exported function Int8SliceToTensor should have comment or be unexported (golint)
    • Line 235: warning: exported function Int16SliceToTensor should have comment or be unexported (golint)
    • Line 276: warning: exported function Int32SliceToTensor should have comment or be unexported (golint)
    • Line 317: warning: exported function Int64SliceToTensor should have comment or be unexported (golint)
    • Line 358: warning: exported function Float32SliceToTensor should have comment or be unexported (golint)
    • Line 399: warning: exported function Float64SliceToTensor should have comment or be unexported (golint)
    • tensorflow/predictor/image_classification_predictor.go
    • Line 22: warning: exported type ImageClassificationPredictor should have comment or be unexported (golint)
    • Line 29: warning: exported function NewImageClassificationPredictor should have comment or be unexported (golint)
    • Line 47: warning: exported method ImageClassificationPredictor.Load should have comment or be unexported (golint)
    • Line 47: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 146: warning: exported method ImageClassificationPredictor.Modality should have comment or be unexported (golint)
    • tensorflow/predictor/image_semanitc_segmentation_predictor.go
    • Line 22: warning: exported type SemanticSegmentationPredictor should have comment or be unexported (golint)
    • Line 29: warning: exported function NewSemanticSegmentationPredictor should have comment or be unexported (golint)
    • Line 48: warning: exported method SemanticSegmentationPredictor.Load should have comment or be unexported (golint)
    • Line 48: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 147: warning: exported method SemanticSegmentationPredictor.Modality should have comment or be unexported (golint)

gocyclo96%

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.

    • tensorflow/graph/type.go
    • Line 132: warning: cyclomatic complexity 23 of function GetDataType() is high (> 15) (gocyclo)
    • Line 84: warning: cyclomatic complexity 22 of function (DataType).ByteCount() is high (> 15) (gocyclo)
    • Line 36: warning: cyclomatic complexity 22 of function (DataType).String() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell93%

Misspell Finds commonly misspelled English words