Preparing report...

Report for github.com/facebookincubator/contest

A+    Excellent!    Found 60 issues across 212 files

Tweet

gofmt97%

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!


gocyclo91%

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.

    • contest/pkg/runner/test_runner.go
    • Line 136: warning: cyclomatic complexity 27 of function (*TestRunner).run() is high (> 15) (gocyclo)
    • Line 305: warning: cyclomatic complexity 23 of function (*TestRunner).waitStepRunners() is high (> 15) (gocyclo)
    • Line 740: warning: cyclomatic complexity 22 of function (*TestRunner).runMonitor() is high (> 15) (gocyclo)
    • Line 446: warning: cyclomatic complexity 18 of function (*TestRunner).targetHandler() is high (> 15) (gocyclo)

golint77%

Golint is a linter for Go source code.

    • contest/pkg/runner/job_runner.go
    • Line 243: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 436: warning: comment on exported method JobRunner.GetCurrentRunAsync should be of the form "GetCurrentRunAsync ..." (golint)
    • contest/pkg/job/events.go
    • Line 75: warning: exported function EventNameToJobState should have comment or be unexported (golint)
    • Line 108: warning: comment on exported var CurrentPauseEventPayloadVersion should be of the form "CurrentPauseEventPayloadVersion ..." (golint)
    • contest/tests/integ/common/storage.go
    • Line 15: warning: exported function GetDatabaseURI should have comment or be unexported (golint)
    • Line 18: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 23: warning: exported function NewStorage should have comment or be unexported (golint)
    • contest/tests/plugins/teststeps/teststep/teststep.go
    • Line 24: warning: exported var Name should have comment or be unexported (golint)
    • Line 27: warning: comment on exported const FailTargetsParam should be of the form "FailTargetsParam ..." (golint)
    • Line 29: warning: comment on exported const FailPctParam should be of the form "FailPctParam ..." (golint)
    • Line 31: warning: comment on exported const DelayTargetsParam should be of the form "DelayTargetsParam ..." (golint)
    • Line 36: warning: exported const StartedEvent should have comment (or a comment on this block) or be unexported (golint)
    • Line 43: warning: exported var Events should have comment or be unexported (golint)
    • Line 45: warning: exported type Step should have comment or be unexported (golint)
    • Line 89: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • contest/pkg/transport/http/http.go
    • Line 28: warning: comment on exported type HTTPPartiallyDecodedResponse should be of the form "HTTPPartiallyDecodedResponse ..." (with optional leading article) (golint)
    • Line 42: warning: exported method HTTP.Version should have comment or be unexported (golint)
    • Line 56: warning: exported method HTTP.Start should have comment or be unexported (golint)
    • Line 72: warning: exported method HTTP.Stop should have comment or be unexported (golint)
    • Line 88: warning: exported method HTTP.Status should have comment or be unexported (golint)
    • Line 104: warning: exported method HTTP.Retry should have comment or be unexported (golint)
    • Line 120: warning: exported method HTTP.List should have comment or be unexported (golint)
    • contest/pkg/xcontext/metrics/prometheus/metrics.go
    • Line 22: warning: exported type Fields should have comment or be unexported (golint)
    • Line 73: warning: exported type CounterVec should have comment or be unexported (golint)
    • Line 79: warning: exported method CounterVec.AddPossibleLabels should have comment or be unexported (golint)
    • Line 83: warning: exported method CounterVec.GetMetricWith should have comment or be unexported (golint)
    • Line 87: warning: exported type GaugeVec should have comment or be unexported (golint)
    • Line 93: warning: exported method GaugeVec.AddPossibleLabels should have comment or be unexported (golint)
    • Line 97: warning: exported method GaugeVec.GetMetricWith should have comment or be unexported (golint)
    • Line 145: warning: exported method Metrics.List should have comment or be unexported (golint)
    • Line 165: warning: exported method Metrics.Registerer should have comment or be unexported (golint)
    • contest/pkg/xcontext/context.go
    • Line 8: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • Line 311: warning: exported type CancelFunc should have comment or be unexported (golint)
    • contest/pkg/storage/job.go
    • Line 45: warning: comment on exported method JobStorageManager.GetJobRequestAsync should be of the form "GetJobRequestAsync ..." (golint)
    • contest/pkg/storage/job_query.go
    • Line 15: warning: exported type JobQueryField should have comment or be unexported (golint)
    • Line 19: warning: exported type JobQueryFields should have comment or be unexported (golint)
    • Line 21: warning: exported type JobQuery should have comment or be unexported (golint)
    • Line 31: warning: exported function QueryJobStates should have comment or be unexported (golint)
    • Line 36: warning: exported function QueryJobTags should have comment or be unexported (golint)
    • Line 41: warning: exported function QueryJobServerID should have comment or be unexported (golint)
    • Line 46: warning: exported function BuildJobQuery should have comment or be unexported (golint)
    • Line 50: warning: exported method JobQueryFields.BuildQuery should have comment or be unexported (golint)
    • Line 60: warning: exported type ErrJobQueryFieldIsAlreadySet should have comment or be unexported (golint)
    • Line 70: warning: comment on exported type ErrJobQueryFieldHasZeroValue should be of the form "ErrJobQueryFieldHasZeroValue ..." (with optional leading article) (golint)
    • Line 80: warning: exported function ApplyJobQueryField should have comment or be unexported (golint)
    • contest/pkg/job/job.go
    • Line 106: warning: exported type State should have comment or be unexported (golint)
    • Line 109: warning: exported const JobStateUnknown should have comment (or a comment on this block) 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!


misspell97%

Misspell Finds commonly misspelled English words