Preparing report...

Report for github.com/rai-project/pytorch

A+    Excellent!    Found 8 issues across 18 files

Tweet

gofmt94%

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!


golint72%

Golint is a linter for Go source code.

    • pytorch/predictor/image_enhancement_predictor.go
    • Line 31: warning: comment on exported function NewImageEnhancementPredictor should be of the form "NewImageEnhancementPredictor ..." (golint)
    • Line 187: warning: exported method ImageEnhancementPredictor.GetInputLayerName should have comment or be unexported (golint)
    • Line 199: warning: exported method ImageEnhancementPredictor.GetOutputLayerName should have comment or be unexported (golint)
    • Line 275: warning: don't use underscores in Go names; var output_array should be outputArray (golint)
    • Line 276: warning: don't use underscores in Go names; var output_batch should be outputBatch (golint)
    • Line 277: warning: don't use underscores in Go names; var output_channels should be outputChannels (golint)
    • Line 278: warning: don't use underscores in Go names; var output_height should be outputHeight (golint)
    • Line 279: warning: don't use underscores in Go names; var output_width should be outputWidth (golint)
    • Line 305: warning: exported method ImageEnhancementPredictor.Reset should have comment or be unexported (golint)
    • Line 310: warning: exported method ImageEnhancementPredictor.Close should have comment or be unexported (golint)
    • Line 314: warning: exported method ImageEnhancementPredictor.Modality should have comment or be unexported (golint)
    • pytorch/predictor/image_object_detection_predictor.go
    • Line 39: warning: comment on exported function NewObjectDetectionPredictor should be of the form "NewObjectDetectionPredictor ..." (golint)
    • Line 226: warning: exported method ObjectDetectionPredictor.GetInputLayerName should have comment or be unexported (golint)
    • Line 238: warning: exported method ObjectDetectionPredictor.GetOutputLayerName should have comment or be unexported (golint)
    • Line 296: warning: don't use underscores in Go names; var input_classes should be inputClasses (golint)
    • Line 297: warning: don't use underscores in Go names; var input_scores should be inputScores (golint)
    • Line 299: warning: don't use underscores in Go names; var max_score should be maxScore (golint)
    • Line 300: warning: don't use underscores in Go names; var max_index should be maxIndex (golint)
    • Line 313: warning: don't use underscores in Go names; var tensor_classes should be tensorClasses (golint)
    • Line 318: warning: don't use underscores in Go names; var tensor_scores should be tensorScores (golint)
    • Line 340: warning: exported method ObjectDetectionPredictor.Modality should have comment or be unexported (golint)
    • pytorch/predictor/image_semantic_segmentation_predictor.go
    • Line 26: warning: exported type SemanticSegmentationPredictor should have comment or be unexported (golint)
    • Line 32: warning: exported function NewSemanticSegmentationPredictor should have comment or be unexported (golint)
    • Line 81: warning: exported method SemanticSegmentationPredictor.Load should have comment or be unexported (golint)
    • Line 215: warning: exported method SemanticSegmentationPredictor.GetInputLayerName should have comment or be unexported (golint)
    • Line 227: warning: exported method SemanticSegmentationPredictor.GetOutputLayerName should have comment or be unexported (golint)
    • Line 287: warning: don't use underscores in Go names; var output_array should be outputArray (golint)
    • Line 288: warning: don't use underscores in Go names; var output_batch should be outputBatch (golint)
    • Line 289: warning: don't use underscores in Go names; var output_feature should be outputFeature (golint)
    • Line 290: warning: don't use underscores in Go names; var output_height should be outputHeight (golint)
    • Line 291: warning: don't use underscores in Go names; var output_width should be outputWidth (golint)
    • Line 316: warning: exported method SemanticSegmentationPredictor.Reset should have comment or be unexported (golint)
    • Line 320: warning: exported method SemanticSegmentationPredictor.Close should have comment or be unexported (golint)
    • Line 327: warning: exported method SemanticSegmentationPredictor.Modality should have comment or be unexported (golint)
    • pytorch/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)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign83%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!