Preparing report...

Report for github.com/c3sr/go-pytorch

A+    Excellent!    Found 7 issues across 16 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!


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!


golint56%

Golint is a linter for Go source code.

    • go-pytorch/trace.go
    • Line 13: warning: exported type TraceEvent should have comment or be unexported (golint)
    • Line 26: warning: exported method TraceEvent.ID should have comment or be unexported (golint)
    • Line 30: warning: exported type TraceEvents should have comment or be unexported (golint)
    • Line 36: warning: exported type Trace should have comment or be unexported (golint)
    • Line 45: warning: exported function NewTrace should have comment or be unexported (golint)
    • Line 45: warning: don't use underscores in Go names; func parameter start_time should be startTime (golint)
    • Line 61: warning: exported method TraceEvent.Publish should have comment or be unexported (golint)
    • Line 61: warning: receiver name event should be consistent with previous receiver name t for TraceEvent (golint)
    • Line 86: warning: exported method Trace.Publish should have comment or be unexported (golint)
    • go-pytorch/device.go
    • Line 6: warning: exported type DeviceKind should have comment or be unexported (golint)
    • Line 9: warning: exported const UnknownDeviceKind should have comment (or a comment on this block) or be unexported (golint)
    • go-pytorch/errors.go
    • Line 33: warning: exported function HasError should have comment or be unexported (golint)
    • Line 37: warning: exported function GetErrorString should have comment or be unexported (golint)
    • Line 45: warning: exported function GetError should have comment or be unexported (golint)
    • Line 54: warning: exported function ResetError should have comment or be unexported (golint)
    • Line 58: warning: exported function PanicOnError should have comment or be unexported (golint)
    • go-pytorch/predictor.go
    • Line 25: warning: exported type Predictor should have comment or be unexported (golint)
    • Line 31: warning: exported function New should have comment or be unexported (golint)
    • Line 75: warning: exported method Predictor.Predict should have comment or be unexported (golint)
    • Line 101: warning: don't use underscores in Go names; var start_time should be startTime (golint)
    • Line 127: warning: exported method Predictor.ReadPredictionOutput should have comment or be unexported (golint)
    • Line 161: warning: exported method Predictor.Close should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell93%

Misspell Finds commonly misspelled English words