Preparing report...

Report for github.com/VertebrateResequencing/wr

(v0.29.0)

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


gocyclo69%

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.

    • jobqueue/jobqueue_test.go
    • Line 4331: warning: cyclomatic complexity 162 of function TestJobqueueRunners() is high (> 15) (gocyclo)
    • Line 5583: warning: cyclomatic complexity 87 of function TestJobqueueWithOpenStack() is high (> 15) (gocyclo)
    • Line 422: warning: cyclomatic complexity 65 of function TestJobqueueSignal() is high (> 15) (gocyclo)
    • Line 1355: warning: cyclomatic complexity 50 of function TestJobqueueMedium() is high (> 15) (gocyclo)
    • Line 886: warning: cyclomatic complexity 39 of function TestJobqueueBasics() is high (> 15) (gocyclo)
    • Line 3209: warning: cyclomatic complexity 22 of function TestJobqueueModify() is high (> 15) (gocyclo)
    • Line 7270: warning: cyclomatic complexity 19 of function runner() is high (> 15) (gocyclo)
    • Line 6965: warning: cyclomatic complexity 17 of function TestJobqueueSpeed() is high (> 15) (gocyclo)
    • cmd/add.go
    • Line 489: warning: cyclomatic complexity 51 of function parseCmdFile() is high (> 15) (gocyclo)
    • jobqueue/db.go
    • Line 138: warning: cyclomatic complexity 45 of function initDB() is high (> 15) (gocyclo)
    • Line 1134: warning: cyclomatic complexity 27 of function (*db).modifyLiveJobs() is high (> 15) (gocyclo)
    • Line 526: warning: cyclomatic complexity 16 of function (*db).prepareNewJobs() is high (> 15) (gocyclo)
    • Line 988: warning: cyclomatic complexity 16 of function (*db).updateJobAfterExit() is high (> 15) (gocyclo)
    • Line 847: warning: cyclomatic complexity 16 of function (*db).retrieveDependentJobs() is high (> 15) (gocyclo)
    • cloud/cloud.go
    • Line 531: warning: cyclomatic complexity 16 of function (*Provider).pickCheapestFlavorFromSubset() is high (> 15) (gocyclo)
    • jobqueue/server.go
    • Line 1217: warning: cyclomatic complexity 86 of function (*Server).createQueue() is high (> 15) (gocyclo)
    • Line 484: warning: cyclomatic complexity 67 of function Serve() is high (> 15) (gocyclo)
    • Line 2613: warning: cyclomatic complexity 22 of function (*Server).shutdown() is high (> 15) (gocyclo)
    • Line 2334: warning: cyclomatic complexity 18 of function (*Server).limitJobs() is high (> 15) (gocyclo)
    • Line 1130: warning: cyclomatic complexity 17 of function (*Server).uploadFile() is high (> 15) (gocyclo)
    • jobqueue/serverWebI.go
    • Line 183: warning: cyclomatic complexity 52 of function webInterfaceStatusWS() is high (> 15) (gocyclo)
    • Line 114: warning: cyclomatic complexity 16 of function webInterfaceStatic() is high (> 15) (gocyclo)
    • jobqueue/job.go
    • Line 1084: warning: cyclomatic complexity 38 of function (*JobModifier).Modify() is high (> 15) (gocyclo)
    • Line 485: warning: cyclomatic complexity 27 of function (*Job).Mount() is high (> 15) (gocyclo)
    • cloud/server.go
    • Line 545: warning: cyclomatic complexity 26 of function (*Server).SSHClient() is high (> 15) (gocyclo)
    • Line 1269: warning: cyclomatic complexity 17 of function (*Server).Destroy() is high (> 15) (gocyclo)
    • Line 183: warning: cyclomatic complexity 16 of function (*Server).WaitUntilReady() is high (> 15) (gocyclo)
    • kubernetes/scheduler/controller.go
    • Line 513: warning: cyclomatic complexity 16 of function (*Controller).reqCheckHandler() is high (> 15) (gocyclo)
    • Line 374: warning: cyclomatic complexity 16 of function (*Controller).processPod() is high (> 15) (gocyclo)
    • cloud/openstack.go
    • Line 366: warning: cyclomatic complexity 45 of function (*openstackp).deploy() is high (> 15) (gocyclo)
    • Line 773: warning: cyclomatic complexity 37 of function (*openstackp).spawn() is high (> 15) (gocyclo)
    • Line 1166: warning: cyclomatic complexity 26 of function (*openstackp).tearDown() is high (> 15) (gocyclo)
    • jobqueue/serverREST.go
    • Line 210: warning: cyclomatic complexity 69 of function (*JobViaJSON).Convert() is high (> 15) (gocyclo)
    • Line 677: warning: cyclomatic complexity 31 of function restJobsAdd() is high (> 15) (gocyclo)
    • Line 592: warning: cyclomatic complexity 23 of function restJobsStatus() is high (> 15) (gocyclo)
    • cmd/cloud.go
    • Line 802: warning: cyclomatic complexity 68 of function bootstrapOnRemote() is high (> 15) (gocyclo)
    • jobqueue/scheduler/openstack.go
    • Line 855: warning: cyclomatic complexity 35 of function (*opst).spawn() is high (> 15) (gocyclo)
    • Line 708: warning: cyclomatic complexity 27 of function (*opst).checkQuota() is high (> 15) (gocyclo)
    • Line 266: warning: cyclomatic complexity 23 of function (*opst).initialize() is high (> 15) (gocyclo)
    • Line 1113: warning: cyclomatic complexity 18 of function (*opst).runCmd() is high (> 15) (gocyclo)
    • Line 455: warning: cyclomatic complexity 18 of function (*opst).determineFlavor() is high (> 15) (gocyclo)
    • jobqueue/scheduler/local.go
    • Line 541: warning: cyclomatic complexity 32 of function (*local).processQueue() is high (> 15) (gocyclo)
    • Line 248: warning: cyclomatic complexity 16 of function (*local).schedule() is high (> 15) (gocyclo)
    • queue/queue.go
    • Line 670: warning: cyclomatic complexity 31 of function (*Queue).Update() is high (> 15) (gocyclo)
    • Line 536: warning: cyclomatic complexity 17 of function (*Queue).AddMany() is high (> 15) (gocyclo)
    • Line 1288: warning: cyclomatic complexity 16 of function (*Queue).startTTRProcessing() is high (> 15) (gocyclo)
    • Line 1131: warning: cyclomatic complexity 16 of function (*Queue).Remove() is high (> 15) (gocyclo)

golint96%

Golint is a linter for Go source code.

    • cloud/server.go
    • Line 365: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • internal/cert.go
    • Line 56: warning: comment on exported const DefaultBitsForRootRSAKey should be of the form "DefaultBitsForRootRSAKey ..." (golint)
    • Line 58: warning: exported const DefualtBitsForServerRSAKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: comment on exported const DefaultCertFileFlags should be of the form "DefaultCertFileFlags ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words