Preparing report...

Report for github.com/dgruber/ubercluster

A+    Excellent!    Found 36 issues across 67 files

Tweet

gofmt95%

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!


gocyclo95%

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.


golint55%

Golint is a linter for Go source code.

    • ubercluster/cmd/dockerproxy/fake/fake_proxy.go
    • Line 16: warning: exported function NewFakeDocker should have comment or be unexported (golint)
    • Line 22: warning: exported method FakeDocker.ContainerCreate should have comment or be unexported (golint)
    • Line 27: warning: exported method FakeDocker.ContainerStart should have comment or be unexported (golint)
    • Line 31: warning: exported method FakeDocker.ContainerPause should have comment or be unexported (golint)
    • Line 35: warning: exported method FakeDocker.ContainerUnpause should have comment or be unexported (golint)
    • Line 39: warning: exported method FakeDocker.ContainerStop should have comment or be unexported (golint)
    • Line 43: warning: exported method FakeDocker.ContainerList should have comment or be unexported (golint)
    • Line 47: warning: exported method FakeDocker.ContainerInspect should have comment or be unexported (golint)
    • Line 51: warning: exported method FakeDocker.ImageList should have comment or be unexported (golint)
    • Line 58: warning: exported method FakeDocker.ImagePull should have comment or be unexported (golint)
    • Line 62: warning: exported method FakeDocker.ClientVersion should have comment or be unexported (golint)
    • ubercluster/pkg/types/drmaa2_interface.go
    • Line 18: warning: exported const Unset should have comment (or a comment on this block) or be unexported (golint)
    • Line 138: warning: exported const OtherCPU should have comment (or a comment on this block) or be unexported (golint)
    • Line 196: warning: exported const OtherOS should have comment (or a comment on this block) or be unexported (golint)
    • Line 252: warning: comment on exported type Machine should be of the form "Machine ..." (with optional leading article) (golint)
    • Line 276: warning: comment on exported const ZeroTime should be of the form "ZeroTime ..." (golint)
    • Line 279: warning: comment on exported const InfiniteTime should be of the form "InfiniteTime ..." (golint)
    • Line 282: warning: comment on exported const UnsetTime should be of the form "UnsetTime ..." (golint)
    • ubercluster/cmd/uc/inception.go
    • Line 32: warning: exported type Inception should have comment or be unexported (golint)
    • Line 38: warning: exported function NewInception should have comment or be unexported (golint)
    • Line 68: warning: exported method Inception.GetJobInfosByFilter should have comment or be unexported (golint)
    • Line 112: warning: exported method Inception.GetJobInfo should have comment or be unexported (golint)
    • Line 132: warning: exported method Inception.GetAllMachines should have comment or be unexported (golint)
    • Line 185: warning: exported method Inception.GetAllSessions should have comment or be unexported (golint)
    • Line 192: warning: exported method Inception.GetAllCategories should have comment or be unexported (golint)
    • Line 210: warning: exported method Inception.DRMSVersion should have comment or be unexported (golint)
    • Line 214: warning: exported method Inception.DRMSName should have comment or be unexported (golint)
    • Line 218: warning: exported method Inception.DRMSLoad should have comment or be unexported (golint)
    • Line 222: warning: exported method Inception.RunJob should have comment or be unexported (golint)
    • Line 226: warning: exported method Inception.JobOperation should have comment or be unexported (golint)
    • ubercluster/pkg/persistency/dummy_persistency.go
    • Line 8: warning: comment on exported type DummyPersistency should be of the form "DummyPersistency ..." (with optional leading article) (golint)
    • Line 13: warning: exported method DummyPersistency.SaveJobTemplate should have comment or be unexported (golint)
    • Line 18: warning: exported method DummyPersistency.SaveJobInfo should have comment or be unexported (golint)
    • ubercluster/cmd/uc/yubikey.go
    • Line 16: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 22: warning: exported function GetYubiKeyOrExit should have comment or be unexported (golint)
    • ubercluster/cmd/d2proxy/d2proxy.go
    • Line 33: warning: exported var JobSessionName should have comment or be unexported (golint)
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 97: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 105: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 168: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 182: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 190: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 196: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 202: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • ubercluster/cmd/cf-tasks/cfproxy.go
    • Line 15: warning: exported function New should have comment or be unexported (golint)
    • Line 29: warning: exported method CFProxy.RunJob should have comment or be unexported (golint)
    • Line 36: warning: exported method CFProxy.JobOperation should have comment or be unexported (golint)
    • Line 55: warning: exported method CFProxy.GetJobInfosByFilter should have comment or be unexported (golint)
    • Line 59: warning: exported method CFProxy.GetJobInfo should have comment or be unexported (golint)
    • Line 63: warning: exported method CFProxy.GetAllMachines should have comment or be unexported (golint)
    • Line 67: warning: exported method CFProxy.GetAllQueues should have comment or be unexported (golint)
    • Line 71: warning: exported method CFProxy.GetAllSessions should have comment or be unexported (golint)
    • Line 75: warning: exported method CFProxy.GetAllCategories should have comment or be unexported (golint)
    • Line 79: warning: exported method CFProxy.DRMSVersion should have comment or be unexported (golint)
    • Line 83: warning: exported method CFProxy.DRMSName should have comment or be unexported (golint)
    • Line 87: warning: exported method CFProxy.DRMSLoad should have comment or be unexported (golint)
    • ubercluster/pkg/staging/filesystem.go
    • Line 35: warning: exported type Filesystem should have comment or be unexported (golint)
    • Line 39: warning: exported function NewFilesystem should have comment or be unexported (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 87: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 100: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 170: warning: comment on exported method Filesystem.FsUploadFiles should be of the form "FsUploadFiles ..." (golint)
    • Line 179: warning: exported method Filesystem.DownloadFile should have comment or be unexported (golint)
    • ubercluster/cmd/dockerproxy/jobinfo.go
    • Line 34: warning: context.Context should be the first parameter of a function (golint)
    • Line 51: warning: context.Context should be the first parameter of a function (golint)
    • Line 59: warning: context.Context should be the first parameter of a function (golint)
    • ubercluster/cmd/dockerproxy/proxy.go
    • Line 17: warning: exported function New should have comment or be unexported (golint)
    • Line 29: warning: exported function NewProxy should have comment or be unexported (golint)
    • Line 37: warning: exported method Proxy.RunJob should have comment or be unexported (golint)
    • Line 44: warning: exported method Proxy.JobOperation should have comment or be unexported (golint)
    • Line 71: warning: exported method Proxy.GetJobInfosByFilter should have comment or be unexported (golint)
    • Line 75: warning: exported method Proxy.GetJobInfo should have comment or be unexported (golint)
    • Line 79: warning: exported method Proxy.GetAllMachines should have comment or be unexported (golint)
    • Line 83: warning: exported method Proxy.GetAllQueues should have comment or be unexported (golint)
    • Line 87: warning: exported method Proxy.GetAllSessions should have comment or be unexported (golint)
    • Line 91: warning: exported method Proxy.GetAllCategories should have comment or be unexported (golint)
    • Line 95: warning: exported method Proxy.DRMSVersion should have comment or be unexported (golint)
    • Line 99: warning: exported method Proxy.DRMSName should have comment or be unexported (golint)
    • Line 103: warning: exported method Proxy.DRMSLoad should have comment or be unexported (golint)
    • ubercluster/cmd/d2proxy/d2helper.go
    • Line 142: warning: exported function ConvertD2JobInfo should have comment or be unexported (golint)
    • Line 164: warning: exported function ConvertUCJobInfo should have comment or be unexported (golint)
    • Line 185: warning: exported function ConvertD2Machine should have comment or be unexported (golint)
    • Line 205: warning: exported function ConvertD2Queue should have comment or be unexported (golint)
    • Line 215: warning: exported function ConvertD2Sessions should have comment or be unexported (golint)
    • Line 225: warning: exported function ConvertUCJobTemplate should have comment or be unexported (golint)
    • ubercluster/cmd/dockerproxy/docker_interface.go
    • Line 14: warning: exported type DockerInterface should have comment or be unexported (golint)
    • Line 27: warning: exported type Docker should have comment or be unexported (golint)
    • Line 32: warning: exported method Docker.ContainerCreate should have comment or be unexported (golint)
    • Line 36: warning: exported method Docker.ContainerStart should have comment or be unexported (golint)
    • Line 40: warning: exported method Docker.ContainerPause should have comment or be unexported (golint)
    • Line 44: warning: exported method Docker.ContainerUnpause should have comment or be unexported (golint)
    • Line 48: warning: exported method Docker.ContainerStop should have comment or be unexported (golint)
    • Line 52: warning: exported method Docker.ContainerList should have comment or be unexported (golint)
    • Line 56: warning: exported method Docker.ContainerInspect should have comment or be unexported (golint)
    • Line 60: warning: exported method Docker.ImagePull should have comment or be unexported (golint)
    • Line 64: warning: exported method Docker.ImageList should have comment or be unexported (golint)
    • Line 68: warning: exported method Docker.ClientVersion should have comment or be unexported (golint)
    • Line 72: warning: exported function NewDocker should have comment or be unexported (golint)
    • ubercluster/cmd/uc/requests.go
    • Line 37: warning: exported type Request should have comment or be unexported (golint)
    • Line 42: warning: exported function NewRequest should have comment or be unexported (golint)
    • Line 93: warning: exported method Request.SelectClusterAddress should have comment or be unexported (golint)
    • Line 110: warning: exported method Request.GetJob should have comment or be unexported (golint)
    • Line 129: warning: exported method Request.ShowJobDetails should have comment or be unexported (golint)
    • Line 138: warning: exported method Request.GetJobs should have comment or be unexported (golint)
    • Line 169: warning: exported method Request.ShowJobs should have comment or be unexported (golint)
    • Line 184: warning: exported method Request.RunLocalRequest should have comment or be unexported (golint)
    • Line 209: warning: exported method Request.CreateJobRequest should have comment or be unexported (golint)
    • Line 256: warning: exported method Request.ShowQueues should have comment or be unexported (golint)
    • Line 260: warning: exported method Request.ShowMachines should have comment or be unexported (golint)
    • Line 280: warning: exported method Request.GetQueues should have comment or be unexported (golint)
    • Line 297: warning: exported method Request.GetMachines should have comment or be unexported (golint)
    • Line 314: warning: exported method Request.ShowMachinesQueues should have comment or be unexported (golint)
    • Line 351: warning: exported method Request.GetJobCategories should have comment or be unexported (golint)
    • Line 368: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 377: warning: exported method Request.ShowJobCategories should have comment or be unexported (golint)
    • Line 383: warning: exported method Request.GetJobSessions should have comment or be unexported (golint)
    • Line 402: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • ubercluster/cmd/uc/scheduler.go
    • Line 40: warning: exported type SchedulerType should have comment or be unexported (golint)
    • Line 43: warning: exported const ProbabilisticSchedulerType should have comment (or a comment on this block) or be unexported (golint)
    • Line 48: warning: exported type SchedulerImpl should have comment or be unexported (golint)
    • Line 82: warning: exported type ProbSched should have comment or be unexported (golint)
    • Line 87: warning: comment on exported method ProbSched.SelectCluster should be of the form "SelectCluster ..." (golint)
    • Line 181: warning: exported type LoadBasedSched should have comment or be unexported (golint)
    • Line 194: warning: exported type RandomSched should have comment or be unexported (golint)
    • ubercluster/pkg/proxy/proxy_handlers.go
    • Line 154: warning: comment on exported function MakeJSessionCategoriesHandler should be of the form "MakeJSessionCategoriesHandler ..." (golint)
    • Line 166: warning: comment on exported function MakeJSessionCategoryHandler should be of the form "MakeJSessionCategoryHandler ..." (golint)
    • Line 300: warning: exported function MakeUCFileUploadHandler should have comment or be unexported (golint)
    • Line 403: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 408: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 466: warning: exported function AutenticationErrorHandler should have comment or be unexported (golint)
    • ubercluster/cmd/cf-tasks/taskinfo.go
    • Line 8: warning: exported function TransformTaskInJobInfo should have comment or be unexported (golint)
    • Line 29: warning: exported function TransformTasksInJobInfo should have comment or be unexported (golint)
    • ubercluster/cmd/processProxy/proxy.go
    • Line 14: warning: exported type Proxy should have comment or be unexported (golint)
    • Line 19: warning: exported function NewProxy should have comment or be unexported (golint)
    • Line 108: warning: comment on exported method Proxy.GetJobInfosByFilter should be of the form "GetJobInfosByFilter ..." (golint)
    • Line 143: warning: comment on exported method Proxy.GetAllMachines should be of the form "GetAllMachines ..." (golint)
    • Line 162: warning: comment on exported method Proxy.GetAllQueues should be of the form "GetAllQueues ..." (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!


misspell82%

Misspell Finds commonly misspelled English words

    • ubercluster/cmd/uc/scheduler.go
    • Line 107: warning: "likelyhood" is a misspelling of "likelihood" (misspell)
    • Line 114: warning: "likelyhood" is a misspelling of "likelihood" (misspell)
    • Line 117: warning: "likelyhood" is a misspelling of "likelihood" (misspell)
    • Line 117: warning: "likelyhood" is a misspelling of "likelihood" (misspell)
    • Line 119: warning: "likelyhood" is a misspelling of "likelihood" (misspell)
    • Line 123: warning: "likelyhood" is a misspelling of "likelihood" (misspell)
    • Line 126: warning: "likelyhood" is a misspelling of "likelihood" (misspell)
    • Line 127: warning: "likelyhood" is a misspelling of "likelihood" (misspell)
    • Line 128: warning: "likelyhood" is a misspelling of "likelihood" (misspell)