Preparing report...

Report for github.com/agill17/go-scm

A+    Excellent!    Found 47 issues across 237 files

Tweet

gofmt89%

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!


gocyclo97%

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.

    • go-scm/scm/const.go
    • Line 116: warning: cyclomatic complexity 21 of function (Action).String() is high (> 15) (gocyclo)
    • Line 167: warning: cyclomatic complexity 17 of function (*Action).UnmarshalJSON() is high (> 15) (gocyclo)

golint92%

Golint is a linter for Go source code.

    • go-scm/scm/factory/factory.go
    • Line 24: warning: error var MissingGitServerURL should have name of the form ErrFoo (golint)
    • Line 162: warning: exported function Client should have comment or be unexported (golint)
    • Line 168: warning: exported function NewWebHookService should have comment or be unexported (golint)
    • go-scm/scm/pr.go
    • Line 14: warning: exported type MergeableState should have comment or be unexported (golint)
    • Line 51: warning: exported type PullRequestInput should have comment or be unexported (golint)
    • go-scm/scm/const.go
    • Line 74: warning: exported method State.MarshalJSON should have comment or be unexported (golint)
    • Line 78: warning: exported method State.UnmarshalJSON should have comment or be unexported (golint)
    • go-scm/scm/webhook.go
    • Line 13: warning: exported type WebhookKind should have comment or be unexported (golint)
    • Line 16: warning: exported const WebhookKindBranch should have comment (or a comment on this block) or be unexported (golint)
    • Line 239: warning: exported type PullRequestHookBranchFrom should have comment or be unexported (golint)
    • Line 243: warning: exported type PullRequestHookBranch should have comment or be unexported (golint)
    • Line 249: warning: exported type PullRequestHookChanges should have comment or be unexported (golint)
    • Line 331: warning: exported method PingHook.Kind should have comment or be unexported (golint)
    • Line 332: warning: exported method PushHook.Kind should have comment or be unexported (golint)
    • Line 333: warning: exported method BranchHook.Kind should have comment or be unexported (golint)
    • Line 334: warning: exported method DeployHook.Kind should have comment or be unexported (golint)
    • Line 335: warning: exported method TagHook.Kind should have comment or be unexported (golint)
    • Line 336: warning: exported method IssueHook.Kind should have comment or be unexported (golint)
    • Line 337: warning: exported method IssueCommentHook.Kind should have comment or be unexported (golint)
    • Line 338: warning: exported method PullRequestHook.Kind should have comment or be unexported (golint)
    • Line 339: warning: exported method PullRequestCommentHook.Kind should have comment or be unexported (golint)
    • Line 340: warning: exported method ReviewHook.Kind should have comment or be unexported (golint)
    • Line 341: warning: exported method ReviewCommentHook.Kind should have comment or be unexported (golint)
    • Line 342: warning: exported method InstallationHook.Kind should have comment or be unexported (golint)
    • Line 343: warning: exported method LabelHook.Kind should have comment or be unexported (golint)
    • Line 344: warning: exported method StatusHook.Kind should have comment or be unexported (golint)
    • Line 345: warning: exported method CheckRunHook.Kind should have comment or be unexported (golint)
    • Line 346: warning: exported method CheckSuiteHook.Kind should have comment or be unexported (golint)
    • Line 347: warning: exported method DeploymentStatusHook.Kind should have comment or be unexported (golint)
    • Line 348: warning: exported method ReleaseHook.Kind should have comment or be unexported (golint)
    • Line 349: warning: exported method RepositoryHook.Kind should have comment or be unexported (golint)
    • Line 350: warning: exported method ForkHook.Kind should have comment or be unexported (golint)
    • Line 351: warning: exported method InstallationRepositoryHook.Kind should have comment or be unexported (golint)
    • Line 352: warning: exported method WatchHook.Kind should have comment or be unexported (golint)
    • Line 353: warning: exported method StarHook.Kind should have comment or be unexported (golint)
    • Line 359: warning: exported method PingHook.Repository should have comment or be unexported (golint)
    • Line 360: warning: exported method PushHook.Repository should have comment or be unexported (golint)
    • Line 361: warning: exported method BranchHook.Repository should have comment or be unexported (golint)
    • Line 362: warning: exported method DeployHook.Repository should have comment or be unexported (golint)
    • Line 363: warning: exported method TagHook.Repository should have comment or be unexported (golint)
    • Line 364: warning: exported method IssueHook.Repository should have comment or be unexported (golint)
    • Line 365: warning: exported method IssueCommentHook.Repository should have comment or be unexported (golint)
    • Line 366: warning: exported method PullRequestHook.Repository should have comment or be unexported (golint)
    • Line 367: warning: exported method PullRequestCommentHook.Repository should have comment or be unexported (golint)
    • Line 368: warning: exported method ReviewCommentHook.Repository should have comment or be unexported (golint)
    • Line 369: warning: exported method ReviewHook.Repository should have comment or be unexported (golint)
    • Line 370: warning: exported method LabelHook.Repository should have comment or be unexported (golint)
    • Line 371: warning: exported method StatusHook.Repository should have comment or be unexported (golint)
    • Line 372: warning: exported method CheckRunHook.Repository should have comment or be unexported (golint)
    • Line 373: warning: exported method CheckSuiteHook.Repository should have comment or be unexported (golint)
    • Line 374: warning: exported method DeploymentStatusHook.Repository should have comment or be unexported (golint)
    • Line 375: warning: exported method ReleaseHook.Repository should have comment or be unexported (golint)
    • Line 376: warning: exported method RepositoryHook.Repository should have comment or be unexported (golint)
    • Line 377: warning: exported method ForkHook.Repository should have comment or be unexported (golint)
    • Line 378: warning: exported method WatchHook.Repository should have comment or be unexported (golint)
    • Line 379: warning: exported method StarHook.Repository should have comment or be unexported (golint)
    • Line 381: warning: exported method InstallationHook.Repository should have comment or be unexported (golint)
    • Line 388: warning: exported method InstallationRepositoryHook.Repository should have comment or be unexported (golint)
    • Line 395: warning: comment on exported method PingHook.GetInstallationRef should be of the form "GetInstallationRef ..." (golint)
    • Line 398: warning: exported method PushHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 399: warning: exported method BranchHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 400: warning: exported method DeployHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 401: warning: exported method TagHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 402: warning: exported method IssueHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 403: warning: exported method IssueCommentHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 404: warning: exported method PullRequestHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 405: warning: exported method PullRequestCommentHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 406: warning: exported method ReviewHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 407: warning: exported method ReviewCommentHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 408: warning: exported method LabelHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 409: warning: exported method StatusHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 410: warning: exported method CheckRunHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 411: warning: exported method CheckSuiteHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 412: warning: exported method DeploymentStatusHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 413: warning: exported method ReleaseHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 414: warning: exported method RepositoryHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 415: warning: exported method ForkHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 416: warning: exported method WatchHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 417: warning: exported method StarHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 419: warning: exported method InstallationHook.GetInstallationRef should have comment or be unexported (golint)
    • Line 428: warning: exported method InstallationRepositoryHook.GetInstallationRef should have comment or be unexported (golint)
    • go-scm/scm/driver/fake/user.go
    • Line 31: warning: receiver name s should be consistent with previous receiver name u for userService (golint)
    • Line 35: warning: receiver name s should be consistent with previous receiver name u for userService (golint)
    • go-scm/scm/driver/gitlab/webhook.go
    • Line 322: warning: don't use underscores in Go names; var created_pr_at should be createdPrAt (golint)
    • Line 323: warning: don't use underscores in Go names; var updated_pr_at should be updatedPrAt (golint)
    • Line 351: warning: don't use underscores in Go names; var created_at should be createdAt (golint)
    • Line 352: warning: don't use underscores in Go names; var updated_at should be updatedAt (golint)
    • go-scm/scm/review.go
    • Line 100: warning: exported const ReviewStateApproved 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!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words