Preparing report...

Report for github.com/bndr/gojenkins

(v1.1.0)

A    Great!    Found 18 issues across 20 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!


gocyclo90%

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.

    • build_history.go
    • Line 12: warning: cyclomatic complexity 29 of function parseBuildHistory() is high (> 15) (gocyclo)
    • request.go
    • Line 149: warning: cyclomatic complexity 25 of function (*Requester).Do() is high (> 15) (gocyclo)

golint15%

Golint is a linter for Go source code.

    • fingerprint.go
    • Line 23: warning: exported type FingerPrint should have comment or be unexported (golint)
    • Line 30: warning: exported type FingerPrintResponse should have comment or be unexported (golint)
    • Line 49: warning: exported method FingerPrint.Valid should have comment or be unexported (golint)
    • Line 62: warning: exported method FingerPrint.ValidateForBuild should have comment or be unexported (golint)
    • Line 82: warning: exported method FingerPrint.GetInfo should have comment or be unexported (golint)
    • Line 90: warning: exported method FingerPrint.Poll should have comment or be unexported (golint)
    • pipeline.go
    • Line 36: warning: exported type PipelineRun should have comment or be unexported (golint)
    • Line 49: warning: exported type PipelineNode should have comment or be unexported (golint)
    • Line 62: warning: exported type PipelineInputAction should have comment or be unexported (golint)
    • Line 69: warning: exported type PipelineArtifact should have comment or be unexported (golint)
    • Line 77: warning: exported type PipelineNodeLog should have comment or be unexported (golint)
    • Line 101: warning: exported method Job.GetPipelineRuns should have comment or be unexported (golint)
    • Line 114: warning: exported method Job.GetPipelineRun should have comment or be unexported (golint)
    • Line 127: warning: exported method PipelineRun.GetPendingInputActions should have comment or be unexported (golint)
    • Line 127: warning: receiver name pr should be consistent with previous receiver name run for PipelineRun (golint)
    • Line 138: warning: exported method PipelineRun.GetArtifacts should have comment or be unexported (golint)
    • Line 138: warning: receiver name pr should be consistent with previous receiver name run for PipelineRun (golint)
    • Line 149: warning: exported method PipelineRun.GetNode should have comment or be unexported (golint)
    • Line 149: warning: receiver name pr should be consistent with previous receiver name run for PipelineRun (golint)
    • Line 160: warning: exported method PipelineNode.GetLog should have comment or be unexported (golint)
    • executor.go
    • Line 17: warning: exported type Executor should have comment or be unexported (golint)
    • Line 21: warning: exported type ViewData should have comment or be unexported (golint)
    • Line 25: warning: exported type ExecutorResponse should have comment or be unexported (golint)
    • credentials.go
    • Line 95: warning: exported type PrivateKeyFile should have comment or be unexported (golint)
    • folder.go
    • Line 24: warning: exported type Folder should have comment or be unexported (golint)
    • Line 30: warning: exported type FolderResponse should have comment or be unexported (golint)
    • Line 45: warning: exported method Folder.GetName should have comment or be unexported (golint)
    • Line 49: warning: exported method Folder.Create should have comment or be unexported (golint)
    • Line 71: warning: exported method Folder.Poll should have comment or be unexported (golint)
    • label.go
    • Line 19: warning: exported type Label should have comment or be unexported (golint)
    • Line 25: warning: exported type MODE should have comment or be unexported (golint)
    • Line 28: warning: exported const NORMAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported type LabelNode should have comment or be unexported (golint)
    • Line 40: warning: exported type LabelResponse should have comment or be unexported (golint)
    • Line 50: warning: exported method Label.GetName should have comment or be unexported (golint)
    • Line 54: warning: exported method Label.GetNodes should have comment or be unexported (golint)
    • Line 58: warning: exported method Label.Poll should have comment or be unexported (golint)
    • plugin.go
    • Line 22: warning: exported type Plugins should have comment or be unexported (golint)
    • Line 29: warning: exported type PluginResponse should have comment or be unexported (golint)
    • Line 33: warning: exported type Plugin should have comment or be unexported (golint)
    • Line 54: warning: exported method Plugins.Count should have comment or be unexported (golint)
    • Line 58: warning: exported method Plugins.Contains should have comment or be unexported (golint)
    • Line 67: warning: exported method Plugins.Poll should have comment or be unexported (golint)
    • constants.go
    • Line 4: warning: exported const STATUS_FAIL should have comment (or a comment on this block) or be unexported (golint)
    • node.go
    • Line 24: warning: exported type Computers should have comment or be unexported (golint)
    • Line 31: warning: exported type Node should have comment or be unexported (golint)
    • Line 37: warning: exported type NodeResponse should have comment or be unexported (golint)
    • Line 69: warning: don't use underscores in Go names; struct field Hudson_NodeMonitors_ArchitectureMonitor should be HudsonNodeMonitorsArchitectureMonitor (golint)
    • Line 70: warning: don't use underscores in Go names; struct field Hudson_NodeMonitors_ClockMonitor should be HudsonNodeMonitorsClockMonitor (golint)
    • Line 71: warning: don't use underscores in Go names; struct field Hudson_NodeMonitors_DiskSpaceMonitor should be HudsonNodeMonitorsDiskSpaceMonitor (golint)
    • Line 72: warning: don't use underscores in Go names; struct field Hudson_NodeMonitors_ResponseTimeMonitor should be HudsonNodeMonitorsResponseTimeMonitor (golint)
    • Line 75: warning: don't use underscores in Go names; struct field Hudson_NodeMonitors_SwapSpaceMonitor should be HudsonNodeMonitorsSwapSpaceMonitor (golint)
    • Line 76: warning: don't use underscores in Go names; struct field Hudson_NodeMonitors_TemporarySpaceMonitor should be HudsonNodeMonitorsTemporarySpaceMonitor (golint)
    • Line 86: warning: exported method Node.Info should have comment or be unexported (golint)
    • Line 94: warning: exported method Node.GetName should have comment or be unexported (golint)
    • Line 98: warning: exported method Node.Delete should have comment or be unexported (golint)
    • Line 106: warning: exported method Node.IsOnline should have comment or be unexported (golint)
    • Line 114: warning: exported method Node.IsTemporarilyOffline should have comment or be unexported (golint)
    • Line 122: warning: exported method Node.IsIdle should have comment or be unexported (golint)
    • Line 130: warning: exported method Node.IsJnlpAgent should have comment or be unexported (golint)
    • Line 138: warning: exported method Node.SetOnline should have comment or be unexported (golint)
    • Line 156: warning: exported method Node.SetOffline should have comment or be unexported (golint)
    • Line 163: warning: exported method Node.ToggleTemporarilyOffline should have comment or be unexported (golint)
    • Line 164: warning: don't use underscores in Go names; var state_before should be stateBefore (golint)
    • Line 176: warning: don't use underscores in Go names; var new_state should be newState (golint)
    • Line 186: warning: exported method Node.Poll should have comment or be unexported (golint)
    • Line 194: warning: exported method Node.LaunchNodeBySSH should have comment or be unexported (golint)
    • Line 206: warning: exported method Node.Disconnect should have comment or be unexported (golint)
    • Line 219: warning: exported method Node.GetLogText should have comment or be unexported (golint)
    • jenkins.go
    • Line 15: warning: package comment should be of the form "Package gojenkins ..." (golint)
    • Line 30: warning: comment on exported type BasicAuth should be of the form "BasicAuth ..." (with optional leading article) (golint)
    • Line 36: warning: exported type Jenkins should have comment or be unexported (golint)
    • Line 85: warning: comment on exported method Jenkins.Info should be of the form "Info ..." (golint)
    • Line 104: warning: comment on exported method Jenkins.CreateNode should be of the form "CreateNode ..." (golint)
    • Line 183: warning: comment on exported method Jenkins.DeleteNode should be of the form "DeleteNode ..." (golint)
    • Line 189: warning: comment on exported method Jenkins.CreateFolder should be of the form "CreateFolder ..." (golint)
    • Line 201: warning: comment on exported method Jenkins.CreateJobInFolder should be of the form "CreateJobInFolder ..." (golint)
    • Line 215: warning: comment on exported method Jenkins.CreateJob should be of the form "CreateJob ..." (golint)
    • Line 234: warning: comment on exported method Jenkins.UpdateJob should be of the form "UpdateJob ..." (golint)
    • Line 242: warning: comment on exported method Jenkins.RenameJob should be of the form "RenameJob ..." (golint)
    • Line 250: warning: comment on exported method Jenkins.CopyJob should be of the form "CopyJob ..." (golint)
    • Line 261: warning: comment on exported method Jenkins.DeleteJob should be of the form "DeleteJob ..." (golint)
    • Line 267: warning: comment on exported method Jenkins.BuildJob should be of the form "BuildJob ..." (golint)
    • Line 275: warning: comment on exported method Jenkins.GetBuildFromQueueID should be of the form "GetBuildFromQueueID ..." (golint)
    • Line 303: warning: exported method Jenkins.GetNode should have comment or be unexported (golint)
    • Line 315: warning: exported method Jenkins.GetLabel should have comment or be unexported (golint)
    • Line 327: warning: exported method Jenkins.GetBuild should have comment or be unexported (golint)
    • Line 340: warning: exported method Jenkins.GetJob should have comment or be unexported (golint)
    • Line 352: warning: exported method Jenkins.GetSubJob should have comment or be unexported (golint)
    • Line 364: warning: exported method Jenkins.GetFolder should have comment or be unexported (golint)
    • Line 376: warning: exported method Jenkins.GetAllNodes should have comment or be unexported (golint)
    • Line 396: warning: comment on exported method Jenkins.GetAllBuildIds should be of the form "GetAllBuildIds ..." (golint)
    • Line 408: warning: comment on exported method Jenkins.GetAllJobNames should be of the form "GetAllJobNames ..." (golint)
    • Line 421: warning: comment on exported method Jenkins.GetAllJobs should be of the form "GetAllJobs ..." (golint)
    • Line 442: warning: comment on exported method Jenkins.GetQueue should be of the form "GetQueue ..." (golint)
    • Line 452: warning: exported method Jenkins.GetQueueUrl should have comment or be unexported (golint)
    • Line 470: warning: comment on exported method Jenkins.GetArtifactData should be of the form "GetArtifactData ..." (golint)
    • Line 476: warning: comment on exported method Jenkins.GetPlugins should be of the form "GetPlugins ..." (golint)
    • Line 497: warning: comment on exported method Jenkins.HasPlugin should be of the form "HasPlugin ..." (golint)
    • Line 519: warning: comment on exported method Jenkins.ValidateFingerPrint should be of the form "ValidateFingerPrint ..." (golint)
    • Line 532: warning: exported method Jenkins.GetView should have comment or be unexported (golint)
    • Line 542: warning: exported method Jenkins.GetAllViews should have comment or be unexported (golint)
    • Line 554: warning: comment on exported method Jenkins.CreateView should be of the form "CreateView ..." (golint)
    • Line 588: warning: exported method Jenkins.Poll should have comment or be unexported (golint)
    • Line 596: warning: comment on exported function CreateJenkins should be of the form "CreateJenkins ..." (golint)
    • build.go
    • Line 27: warning: exported type Build should have comment or be unexported (golint)
    • Line 45: warning: exported type BuildRevision should have comment or be unexported (golint)
    • Line 50: warning: exported type Builds should have comment or be unexported (golint)
    • Line 57: warning: exported type Culprit should have comment or be unexported (golint)
    • Line 76: warning: exported type TestResult should have comment or be unexported (golint)
    • Line 106: warning: exported type BuildResponse should have comment or be unexported (golint)
    • Line 192: warning: comment on exported method Build.Info should be of the form "Info ..." (golint)
    • Line 197: warning: exported method Build.GetActions should have comment or be unexported (golint)
    • Line 201: warning: exported method Build.GetUrl should have comment or be unexported (golint)
    • Line 205: warning: exported method Build.GetBuildNumber should have comment or be unexported (golint)
    • Line 208: warning: exported method Build.GetResult should have comment or be unexported (golint)
    • Line 212: warning: exported method Build.GetArtifacts should have comment or be unexported (golint)
    • Line 225: warning: exported method Build.GetCulprits should have comment or be unexported (golint)
    • Line 229: warning: exported method Build.Stop should have comment or be unexported (golint)
    • Line 240: warning: exported method Build.GetConsoleOutput should have comment or be unexported (golint)
    • Line 247: warning: exported method Build.GetConsoleOutputFromIndex should have comment or be unexported (golint)
    • Line 270: warning: exported method Build.GetCauses should have comment or be unexported (golint)
    • Line 283: warning: exported method Build.GetParameters should have comment or be unexported (golint)
    • Line 292: warning: exported method Build.GetInjectedEnvVars should have comment or be unexported (golint)
    • Line 304: warning: exported method Build.GetDownstreamBuilds should have comment or be unexported (golint)
    • Line 332: warning: exported method Build.GetDownstreamJobNames should have comment or be unexported (golint)
    • Line 348: warning: exported method Build.GetAllFingerPrints should have comment or be unexported (golint)
    • Line 357: warning: exported method Build.GetUpstreamJob should have comment or be unexported (golint)
    • Line 371: warning: exported method Build.GetUpstreamBuildNumber should have comment or be unexported (golint)
    • Line 389: warning: exported method Build.GetUpstreamBuild should have comment or be unexported (golint)
    • Line 403: warning: exported method Build.GetMatrixRuns should have comment or be unexported (golint)
    • Line 419: warning: exported method Build.GetResultSet should have comment or be unexported (golint)
    • Line 433: warning: exported method Build.GetTimestamp should have comment or be unexported (golint)
    • Line 438: warning: exported method Build.GetDuration should have comment or be unexported (golint)
    • Line 442: warning: exported method Build.GetRevision should have comment or be unexported (golint)
    • Line 460: warning: exported method Build.GetRevisionBranch should have comment or be unexported (golint)
    • Line 474: warning: exported method Build.IsGood should have comment or be unexported (golint)
    • Line 478: warning: exported method Build.IsRunning should have comment or be unexported (golint)
    • Line 486: warning: exported method Build.SetDescription should have comment or be unexported (golint)
    • jenkins_test.go
    • Line 28: warning: don't use underscores in Go names; var job_data should be jobData (golint)
    • Line 112: warning: don't use underscores in Go names; var list_view should be listView (golint)
    • Line 118: warning: don't use underscores in Go names; var my_view should be myView (golint)
    • Line 253: warning: don't use underscores in Go names; var job_data should be jobData (golint)
    • job.go
    • Line 29: warning: exported type Job should have comment or be unexported (golint)
    • Line 35: warning: exported type JobBuild should have comment or be unexported (golint)
    • Line 40: warning: exported type InnerJob should have comment or be unexported (golint)
    • Line 47: warning: exported type ParameterDefinition should have comment or be unexported (golint)
    • Line 57: warning: exported type JobResponse should have comment or be unexported (golint)
    • Line 104: warning: exported type History should have comment or be unexported (golint)
    • Line 111: warning: exported method Job.GetName should have comment or be unexported (golint)
    • Line 115: warning: exported method Job.GetDescription should have comment or be unexported (golint)
    • Line 119: warning: exported method Job.GetDetails should have comment or be unexported (golint)
    • Line 123: warning: exported method Job.GetBuild should have comment or be unexported (golint)
    • Line 172: warning: exported method Job.GetLastSuccessfulBuild should have comment or be unexported (golint)
    • Line 176: warning: exported method Job.GetFirstBuild should have comment or be unexported (golint)
    • Line 180: warning: exported method Job.GetLastBuild should have comment or be unexported (golint)
    • Line 184: warning: exported method Job.GetLastStableBuild should have comment or be unexported (golint)
    • Line 188: warning: exported method Job.GetLastFailedBuild should have comment or be unexported (golint)
    • Line 192: warning: exported method Job.GetLastCompletedBuild should have comment or be unexported (golint)
    • Line 196: warning: exported method Job.GetBuildsFields should have comment or be unexported (golint)
    • Line 208: warning: comment on exported method Job.GetAllBuildIds should be of the form "GetAllBuildIds ..." (golint)
    • Line 220: warning: exported method Job.GetUpstreamJobsMetadata should have comment or be unexported (golint)
    • Line 224: warning: exported method Job.GetDownstreamJobsMetadata should have comment or be unexported (golint)
    • Line 228: warning: exported method Job.GetInnerJobsMetadata should have comment or be unexported (golint)
    • Line 232: warning: exported method Job.GetUpstreamJobs should have comment or be unexported (golint)
    • Line 244: warning: exported method Job.GetDownstreamJobs should have comment or be unexported (golint)
    • Line 256: warning: exported method Job.GetInnerJob should have comment or be unexported (golint)
    • Line 268: warning: exported method Job.GetInnerJobs should have comment or be unexported (golint)
    • Line 280: warning: exported method Job.Enable should have comment or be unexported (golint)
    • Line 291: warning: exported method Job.Disable should have comment or be unexported (golint)
    • Line 302: warning: exported method Job.Delete should have comment or be unexported (golint)
    • Line 313: warning: exported method Job.Rename should have comment or be unexported (golint)
    • Line 323: warning: exported method Job.Create should have comment or be unexported (golint)
    • Line 339: warning: exported method Job.Copy should have comment or be unexported (golint)
    • Line 356: warning: exported method Job.UpdateConfig should have comment or be unexported (golint)
    • Line 372: warning: exported method Job.GetConfig should have comment or be unexported (golint)
    • Line 381: warning: exported method Job.GetParameters should have comment or be unexported (golint)
    • Line 393: warning: exported method Job.IsQueued should have comment or be unexported (golint)
    • Line 400: warning: exported method Job.IsRunning should have comment or be unexported (golint)
    • Line 411: warning: exported method Job.IsEnabled should have comment or be unexported (golint)
    • Line 418: warning: exported method Job.HasQueuedBuild should have comment or be unexported (golint)
    • Line 422: warning: exported method Job.InvokeSimple should have comment or be unexported (golint)
    • Line 471: warning: exported method Job.Invoke should have comment or be unexported (golint)
    • Line 519: warning: exported method Job.Poll should have comment or be unexported (golint)
    • Line 527: warning: exported method Job.History should have comment or be unexported (golint)
    • Line 537: warning: exported method PipelineRun.ProceedInput should have comment or be unexported (golint)
    • Line 556: warning: exported method PipelineRun.AbortInput should have comment or be unexported (golint)
    • queue.go
    • Line 22: warning: exported type Queue should have comment or be unexported (golint)
    • Line 32: warning: exported type Task should have comment or be unexported (golint)
    • Line 67: warning: exported method Queue.Tasks should have comment or be unexported (golint)
    • Line 75: warning: exported method Queue.GetTaskById should have comment or be unexported (golint)
    • Line 84: warning: exported method Queue.GetTasksForJob should have comment or be unexported (golint)
    • Line 94: warning: exported method Queue.CancelTask should have comment or be unexported (golint)
    • Line 99: warning: exported method Task.Cancel should have comment or be unexported (golint)
    • Line 110: warning: exported method Task.GetJob should have comment or be unexported (golint)
    • Line 114: warning: exported method Task.GetWhy should have comment or be unexported (golint)
    • Line 118: warning: exported method Task.GetParameters should have comment or be unexported (golint)
    • Line 127: warning: exported method Task.GetCauses should have comment or be unexported (golint)
    • Line 136: warning: exported method Queue.Poll should have comment or be unexported (golint)
    • Line 144: warning: exported method Task.Poll should have comment or be unexported (golint)
    • request.go
    • Line 37: warning: exported type APIRequest should have comment or be unexported (golint)
    • Line 45: warning: exported method APIRequest.SetHeader should have comment or be unexported (golint)
    • Line 50: warning: exported function NewAPIRequest should have comment or be unexported (golint)
    • Line 57: warning: exported type Requester should have comment or be unexported (golint)
    • Line 65: warning: exported method Requester.SetCrumb should have comment or be unexported (golint)
    • Line 77: warning: exported method Requester.PostJSON should have comment or be unexported (golint)
    • Line 87: warning: exported method Requester.Post should have comment or be unexported (golint)
    • Line 97: warning: exported method Requester.PostFiles should have comment or be unexported (golint)
    • Line 105: warning: exported method Requester.PostXML should have comment or be unexported (golint)
    • Line 116: warning: exported method Requester.GetJSON should have comment or be unexported (golint)
    • Line 123: warning: exported method Requester.GetXML should have comment or be unexported (golint)
    • Line 130: warning: exported method Requester.Get should have comment or be unexported (golint)
    • Line 136: warning: exported method Requester.SetClient should have comment or be unexported (golint)
    • Line 149: warning: exported method Requester.Do should have comment or be unexported (golint)
    • Line 232: 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 255: warning: exported method Requester.ReadRawResponse should have comment or be unexported (golint)
    • Line 271: warning: exported method Requester.ReadJSONResponse should have comment or be unexported (golint)
    • views.go
    • Line 23: warning: exported type View should have comment or be unexported (golint)
    • Line 29: warning: exported type ViewResponse should have comment or be unexported (golint)
    • Line 38: warning: exported var LIST_VIEW should have comment or be unexported (golint)
    • Line 45: warning: comment on exported method View.AddJob should be of the form "AddJob ..." (golint)
    • Line 59: warning: comment on exported method View.DeleteJob should be of the form "DeleteJob ..." (golint)
    • Line 73: warning: exported method View.GetDescription should have comment or be unexported (golint)
    • Line 77: warning: exported method View.GetJobs should have comment or be unexported (golint)
    • Line 81: warning: exported method View.GetName should have comment or be unexported (golint)
    • Line 85: warning: exported method View.GetUrl should have comment or be unexported (golint)
    • Line 89: warning: exported method View.Poll should have comment or be unexported (golint)
    • artifact.go
    • Line 28: warning: comment on exported type Artifact should be of the form "Artifact ..." (with optional leading article) (golint)
    • Line 36: warning: comment on exported method Artifact.GetData should be of the form "GetData ..." (golint)
    • Line 74: warning: comment on exported method Artifact.SaveToDir should be of the form "SaveToDir ..." (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!