Preparing report...

Report for github.com/github/hub

A+    Excellent!    Found 42 issues across 98 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!


gocyclo82%

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.

    • hub/ui/format.go
    • Line 100: warning: cyclomatic complexity 18 of function (*expander).expandSpecialChar() is high (> 15) (gocyclo)

golint69%

Golint is a linter for Go source code.

    • hub/git/ssh_config.go
    • Line 17: warning: exported type SSHConfig should have comment or be unexported (golint)
    • Line 33: warning: exported type SSHConfigReader should have comment or be unexported (golint)
    • hub/github/client.go
    • Line 24: warning: exported const GitHubHost should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported var UserAgent should have comment or be unexported (golint)
    • Line 30: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 34: warning: exported function NewClientWithHost should have comment or be unexported (golint)
    • Line 38: warning: exported type Client should have comment or be unexported (golint)
    • Line 43: warning: exported type Gist should have comment or be unexported (golint)
    • Line 51: warning: exported type GistFile should have comment or be unexported (golint)
    • Line 58: warning: exported method Client.FetchPullRequests should have comment or be unexported (golint)
    • Line 97: warning: exported method Client.PullRequest should have comment or be unexported (golint)
    • Line 114: warning: exported method Client.PullRequestPatch should have comment or be unexported (golint)
    • Line 128: warning: exported method Client.CreatePullRequest should have comment or be unexported (golint)
    • Line 149: warning: exported type PullRequestMergeResponse should have comment or be unexported (golint)
    • Line 155: warning: exported method Client.MergePullRequest should have comment or be unexported (golint)
    • Line 171: warning: exported method Client.DeleteBranch should have comment or be unexported (golint)
    • Line 191: warning: exported method Client.RequestReview should have comment or be unexported (golint)
    • Line 206: warning: exported method Client.CommitPatch should have comment or be unexported (golint)
    • Line 220: warning: exported method Client.GistPatch should have comment or be unexported (golint)
    • Line 249: warning: exported method Client.Repository should have comment or be unexported (golint)
    • Line 265: warning: exported method Client.CreateRepository should have comment or be unexported (golint)
    • Line 293: warning: exported method Client.DeleteRepository should have comment or be unexported (golint)
    • Line 304: warning: exported type Release should have comment or be unexported (golint)
    • Line 321: warning: exported type ReleaseAsset should have comment or be unexported (golint)
    • Line 328: warning: exported method Client.FetchReleases should have comment or be unexported (golint)
    • Line 364: warning: exported method Client.FetchRelease should have comment or be unexported (golint)
    • Line 378: warning: exported method Client.CreateRelease should have comment or be unexported (golint)
    • Line 394: warning: exported method Client.EditRelease should have comment or be unexported (golint)
    • Line 410: warning: exported method Client.DeleteRelease should have comment or be unexported (golint)
    • Line 424: warning: exported type LocalAsset should have comment or be unexported (golint)
    • Line 431: warning: exported method Client.UploadReleaseAssets should have comment or be unexported (golint)
    • Line 491: warning: exported method Client.DeleteReleaseAsset should have comment or be unexported (golint)
    • Line 503: warning: exported method Client.DownloadReleaseAsset should have comment or be unexported (golint)
    • Line 517: warning: exported type CIStatusResponse should have comment or be unexported (golint)
    • Line 522: warning: exported type CIStatus should have comment or be unexported (golint)
    • Line 528: warning: exported type CheckRunsResponse should have comment or be unexported (golint)
    • Line 532: warning: exported type CheckRun should have comment or be unexported (golint)
    • Line 539: warning: exported method Client.FetchCIStatus should have comment or be unexported (golint)
    • Line 599: warning: exported type Repository should have comment or be unexported (golint)
    • Line 611: warning: exported type RepositoryPermissions should have comment or be unexported (golint)
    • Line 617: warning: exported method Client.ForkRepository should have comment or be unexported (golint)
    • Line 634: warning: exported type Comment should have comment or be unexported (golint)
    • Line 641: warning: exported type Issue should have comment or be unexported (golint)
    • Line 673: warning: exported type PullRequest should have comment or be unexported (golint)
    • Line 675: warning: exported type PullRequestSpec should have comment or be unexported (golint)
    • Line 682: warning: exported method PullRequest.IsSameRepo should have comment or be unexported (golint)
    • Line 688: warning: exported method PullRequest.HasRequestedReviewer should have comment or be unexported (golint)
    • Line 697: warning: exported method PullRequest.HasRequestedTeam should have comment or be unexported (golint)
    • Line 706: warning: exported type IssueLabel should have comment or be unexported (golint)
    • Line 711: warning: exported type User should have comment or be unexported (golint)
    • Line 715: warning: exported type Team should have comment or be unexported (golint)
    • Line 720: warning: exported type Milestone should have comment or be unexported (golint)
    • Line 725: warning: exported method Client.FetchIssues should have comment or be unexported (golint)
    • Line 764: warning: exported method Client.FetchIssue should have comment or be unexported (golint)
    • Line 780: warning: exported method Client.FetchComments should have comment or be unexported (golint)
    • Line 796: warning: exported method Client.CreateIssue should have comment or be unexported (golint)
    • Line 812: warning: exported method Client.UpdateIssue should have comment or be unexported (golint)
    • Line 839: warning: exported method Client.FetchLabels should have comment or be unexported (golint)
    • Line 869: warning: exported method Client.FetchMilestones should have comment or be unexported (golint)
    • Line 897: warning: exported method Client.GenericAPIRequest should have comment or be unexported (golint)
    • Line 969: warning: exported method Client.CurrentUser should have comment or be unexported (golint)
    • Line 985: warning: exported type AuthorizationEntry should have comment or be unexported (golint)
    • Line 1001: warning: exported method Client.FindOrCreateToken should have comment or be unexported (golint)
    • Line 1119: warning: exported method Client.FetchGist should have comment or be unexported (golint)
    • Line 1134: warning: exported method Client.CreateGist should have comment or be unexported (golint)
    • hub/git/git.go
    • Line 12: warning: exported var GlobalFlags should have comment or be unexported (golint)
    • Line 14: warning: exported function Version should have comment or be unexported (golint)
    • Line 25: warning: exported function Dir should have comment or be unexported (golint)
    • Line 68: warning: exported function WorkdirName should have comment or be unexported (golint)
    • Line 79: warning: exported function HasFile should have comment or be unexported (golint)
    • Line 107: warning: exported function Editor should have comment or be unexported (golint)
    • Line 118: warning: exported function Head should have comment or be unexported (golint)
    • Line 142: warning: exported function Ref should have comment or be unexported (golint)
    • Line 153: warning: exported function RefList should have comment or be unexported (golint)
    • Line 165: warning: exported function NewRange should have comment or be unexported (golint)
    • Line 180: warning: exported type Range should have comment or be unexported (golint)
    • Line 185: warning: exported method Range.IsIdentical should have comment or be unexported (golint)
    • Line 189: warning: exported method Range.IsAncestor should have comment or be unexported (golint)
    • Line 194: warning: exported function CommentChar should have comment or be unexported (golint)
    • Line 216: warning: exported function Show should have comment or be unexported (golint)
    • Line 226: warning: exported function Log should have comment or be unexported (golint)
    • Line 242: warning: exported function Remotes should have comment or be unexported (golint)
    • Line 249: warning: exported function Config should have comment or be unexported (golint)
    • Line 253: warning: exported function ConfigAll should have comment or be unexported (golint)
    • Line 267: warning: exported function GlobalConfig should have comment or be unexported (golint)
    • Line 271: warning: exported function SetGlobalConfig should have comment or be unexported (golint)
    • Line 297: warning: exported function Alias should have comment or be unexported (golint)
    • Line 301: warning: exported function Run should have comment or be unexported (golint)
    • Line 306: warning: exported function Spawn should have comment or be unexported (golint)
    • Line 311: warning: exported function Quiet should have comment or be unexported (golint)
    • Line 316: warning: exported function IsGitDir should have comment or be unexported (golint)
    • Line 322: warning: exported function LocalBranches should have comment or be unexported (golint)
    • Line 365: warning: exported function IsBuiltInGitCommand should have comment or be unexported (golint)
    • hub/github/hosts.go
    • Line 13: warning: exported var GitHubHostEnv should have comment or be unexported (golint)
    • Line 17: warning: exported type HostError should have comment or be unexported (golint)
    • Line 57: warning: exported function DefaultGitHubHost should have comment or be unexported (golint)
    • hub/github/remote.go
    • Line 13: warning: exported var OriginNamesInLookupOrder should have comment or be unexported (golint)
    • Line 16: warning: exported type Remote should have comment or be unexported (golint)
    • Line 26: warning: exported method Remote.Project should have comment or be unexported (golint)
    • Line 34: warning: exported function Remotes should have comment or be unexported (golint)
    • hub/commands/commands.go
    • Line 12: warning: exported var NameRe should have comment or be unexported (golint)
    • Line 19: warning: exported type Command should have comment or be unexported (golint)
    • Line 32: warning: exported method Command.Call should have comment or be unexported (golint)
    • Line 50: warning: exported type ErrHelp should have comment or be unexported (golint)
    • Line 77: warning: exported method Command.Use should have comment or be unexported (golint)
    • Line 85: warning: exported method Command.UsageError should have comment or be unexported (golint)
    • Line 93: warning: exported method Command.Synopsis should have comment or be unexported (golint)
    • Line 111: warning: exported method Command.HelpText should have comment or be unexported (golint)
    • Line 136: warning: exported method Command.Name should have comment or be unexported (golint)
    • Line 144: warning: exported method Command.Runnable should have comment or be unexported (golint)
    • hub/github/localrepo.go
    • Line 11: warning: exported function LocalRepo should have comment or be unexported (golint)
    • Line 23: warning: exported type GitHubRepo should have comment or be unexported (golint)
    • Line 41: warning: exported method GitHubRepo.RemoteByName should have comment or be unexported (golint)
    • Line 96: warning: exported method GitHubRepo.CurrentBranch should have comment or be unexported (golint)
    • Line 107: warning: exported method GitHubRepo.MasterBranch should have comment or be unexported (golint)
    • Line 114: warning: exported method GitHubRepo.DefaultBranch should have comment or be unexported (golint)
    • Line 127: warning: exported method GitHubRepo.RemoteBranchAndProject should have comment or be unexported (golint)
    • Line 193: warning: exported method GitHubRepo.RemoteForBranch should have comment or be unexported (golint)
    • Line 203: warning: exported method GitHubRepo.RemoteForRepo should have comment or be unexported (golint)
    • Line 225: warning: exported method GitHubRepo.RemoteForProject should have comment or be unexported (golint)
    • Line 239: warning: exported method GitHubRepo.MainRemote should have comment or be unexported (golint)
    • Line 248: warning: exported method GitHubRepo.MainProject should have comment or be unexported (golint)
    • Line 259: warning: exported method GitHubRepo.CurrentProject should have comment or be unexported (golint)
    • Line 268: warning: exported method GitHubRepo.UpstreamProject should have comment or be unexported (golint)
    • hub/github/config.go
    • Line 28: warning: exported type Host should have comment or be unexported (golint)
    • Line 36: warning: exported type Config should have comment or be unexported (golint)
    • Line 40: warning: exported method Config.PromptForHost should have comment or be unexported (golint)
    • Line 144: warning: exported method Config.DetectToken should have comment or be unexported (golint)
    • Line 148: warning: exported method Config.PromptForUser should have comment or be unexported (golint)
    • Line 160: warning: exported method Config.PromptForPassword should have comment or be unexported (golint)
    • Line 178: warning: exported method Config.PromptForOTP should have comment or be unexported (golint)
    • Line 225: warning: exported method Config.Find should have comment or be unexported (golint)
    • Line 322: warning: exported function CurrentConfig should have comment or be unexported (golint)
    • Line 333: warning: exported method Config.DefaultHost should have comment or be unexported (golint)
    • Line 347: warning: exported method Config.DefaultHostNoPrompt should have comment or be unexported (golint)
    • hub/ui/ui.go
    • Line 12: warning: exported type UI should have comment or be unexported (golint)
    • Line 21: warning: exported var Stdout should have comment or be unexported (golint)
    • Line 26: warning: exported function Print should have comment or be unexported (golint)
    • Line 35: warning: exported function Printf should have comment or be unexported (golint)
    • Line 44: warning: exported function Println should have comment or be unexported (golint)
    • Line 53: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 62: warning: exported function Errorln should have comment or be unexported (golint)
    • Line 71: warning: exported function IsTerminal should have comment or be unexported (golint)
    • Line 75: warning: exported type Console should have comment or be unexported (golint)
    • Line 80: warning: exported method Console.Print should have comment or be unexported (golint)
    • Line 84: warning: exported method Console.Printf should have comment or be unexported (golint)
    • Line 88: warning: exported method Console.Println should have comment or be unexported (golint)
    • Line 92: warning: exported method Console.Errorf should have comment or be unexported (golint)
    • Line 96: warning: exported method Console.Errorln should have comment or be unexported (golint)
    • hub/github/branch.go
    • Line 11: warning: exported type Branch should have comment or be unexported (golint)
    • Line 16: warning: exported method Branch.ShortName should have comment or be unexported (golint)
    • Line 21: warning: exported method Branch.LongName should have comment or be unexported (golint)
    • Line 26: warning: exported method Branch.RemoteName should have comment or be unexported (golint)
    • Line 35: warning: exported method Branch.Upstream should have comment or be unexported (golint)
    • Line 46: warning: exported method Branch.IsMaster should have comment or be unexported (golint)
    • Line 51: warning: exported method Branch.IsRemote should have comment or be unexported (golint)
    • hub/commands/args.go
    • Line 11: warning: exported type Args should have comment or be unexported (golint)
    • Line 26: warning: exported method Args.Words should have comment or be unexported (golint)
    • Line 37: warning: exported method Args.Before should have comment or be unexported (golint)
    • Line 41: warning: exported method Args.After should have comment or be unexported (golint)
    • Line 45: warning: exported method Args.AfterFn should have comment or be unexported (golint)
    • Line 49: warning: exported method Args.NoForward should have comment or be unexported (golint)
    • Line 53: warning: exported method Args.Replace should have comment or be unexported (golint)
    • Line 61: warning: exported method Args.Commands should have comment or be unexported (golint)
    • Line 87: warning: exported method Args.ToCmd should have comment or be unexported (golint)
    • Line 101: warning: exported method Args.GetParam should have comment or be unexported (golint)
    • Line 105: warning: exported method Args.FirstParam should have comment or be unexported (golint)
    • Line 113: warning: exported method Args.LastParam should have comment or be unexported (golint)
    • Line 121: warning: exported method Args.HasSubcommand should have comment or be unexported (golint)
    • Line 125: warning: exported method Args.InsertParam should have comment or be unexported (golint)
    • Line 142: warning: exported method Args.RemoveParam should have comment or be unexported (golint)
    • Line 148: warning: exported method Args.ReplaceParam should have comment or be unexported (golint)
    • Line 156: warning: exported method Args.IndexOfParam should have comment or be unexported (golint)
    • Line 166: warning: exported method Args.ParamsSize should have comment or be unexported (golint)
    • Line 170: warning: exported method Args.IsParamsEmpty should have comment or be unexported (golint)
    • Line 174: warning: exported method Args.PrependParams should have comment or be unexported (golint)
    • Line 178: warning: exported method Args.AppendParams should have comment or be unexported (golint)
    • Line 182: warning: exported function NewArgs should have comment or be unexported (golint)
    • hub/commands/runner.go
    • Line 13: warning: exported type Runner should have comment or be unexported (golint)
    • Line 17: warning: exported function NewRunner should have comment or be unexported (golint)
    • Line 23: warning: exported method Runner.All should have comment or be unexported (golint)
    • Line 27: warning: exported method Runner.Use should have comment or be unexported (golint)
    • Line 34: warning: exported method Runner.Lookup should have comment or be unexported (golint)
    • Line 38: warning: exported method Runner.Execute should have comment or be unexported (golint)
    • hub/github/template.go
    • Line 12: warning: exported const PullRequestTemplate should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported function ReadTemplate should have comment or be unexported (golint)
    • hub/github/url.go
    • Line 8: warning: exported type URL should have comment or be unexported (golint)
    • Line 13: warning: exported method URL.ProjectPath should have comment or be unexported (golint)
    • Line 22: warning: exported function ParseURL should have comment or be unexported (golint)
    • hub/fixtures/test_configs.go
    • Line 8: warning: exported type TestConfigs should have comment or be unexported (golint)
    • Line 12: warning: exported method TestConfigs.TearDown should have comment or be unexported (golint)
    • Line 17: warning: exported function SetupTomlTestConfig should have comment or be unexported (golint)
    • Line 31: warning: exported function SetupTomlTestConfigWithUnixSocket should have comment or be unexported (golint)
    • Line 46: warning: exported function SetupTestConfigs should have comment or be unexported (golint)
    • Line 60: warning: exported function SetupTestConfigsWithUnixSocket should have comment or be unexported (golint)
    • Line 75: warning: exported function SetupTestConfigsInvalidHostName should have comment or be unexported (golint)
    • Line 90: warning: exported function SetupTestConfigsInvalidHostEntry should have comment or be unexported (golint)
    • Line 101: warning: exported function SetupTestConfigsInvalidPropertyValue should have comment or be unexported (golint)
    • hub/utils/color.go
    • Line 11: warning: exported var Black should have comment or be unexported (golint)
    • Line 21: warning: exported type Color should have comment or be unexported (golint)
    • Line 27: warning: exported function NewColor should have comment or be unexported (golint)
    • Line 48: warning: exported method Color.Distance should have comment or be unexported (golint)
    • Line 62: warning: exported method Color.Luminance should have comment or be unexported (golint)
    • Line 68: warning: exported method Color.ContrastRatio should have comment or be unexported (golint)
    • Line 134: warning: exported function RgbToTermColorCode should have comment or be unexported (golint)
    • hub/utils/utils.go
    • Line 19: warning: exported function Check should have comment or be unexported (golint)
    • Line 26: warning: exported function ConcatPaths should have comment or be unexported (golint)
    • Line 30: warning: exported function BrowserLauncher should have comment or be unexported (golint)
    • Line 66: warning: exported function CommandPath should have comment or be unexported (golint)
    • Line 84: warning: exported function TimeAgo should have comment or be unexported (golint)
    • hub/github/message_builder.go
    • Line 8: warning: exported type MessageBuilder should have comment or be unexported (golint)
    • Line 17: warning: exported method MessageBuilder.AddCommentedSection should have comment or be unexported (golint)
    • Line 21: warning: exported method MessageBuilder.Extract should have comment or be unexported (golint)
    • Line 49: warning: exported method MessageBuilder.Cleanup should have comment or be unexported (golint)
    • Line 55: warning: exported function SplitTitleBody should have comment or be unexported (golint)
    • hub/github/project.go
    • Line 14: warning: exported type Project should have comment or be unexported (golint)
    • Line 25: warning: exported method Project.SameAs should have comment or be unexported (golint)
    • Line 31: warning: exported method Project.WebURL should have comment or be unexported (golint)
    • Line 65: warning: exported method Project.GitURL should have comment or be unexported (golint)
    • Line 105: warning: exported function NewProjectFromRepo should have comment or be unexported (golint)
    • Line 115: warning: exported function NewProjectFromURL should have comment or be unexported (golint)
    • Line 133: warning: exported function NewProject should have comment or be unexported (golint)
    • Line 187: warning: exported function SanitizeProjectName should have comment or be unexported (golint)
    • hub/git/url.go
    • Line 14: warning: exported type URLParser should have comment or be unexported (golint)
    • Line 18: warning: exported method URLParser.Parse should have comment or be unexported (golint)
    • Line 58: warning: exported function ParseURL should have comment or be unexported (golint)
    • hub/md2roff/renderer.go
    • Line 44: warning: exported type RoffRenderer should have comment or be unexported (golint)
    • Line 55: warning: exported method RoffRenderer.RenderHeader should have comment or be unexported (golint)
    • Line 58: warning: exported method RoffRenderer.RenderFooter should have comment or be unexported (golint)
    • Line 61: warning: exported method RoffRenderer.RenderNode should have comment or be unexported (golint)
    • Line 208: warning: exported function Opt should have comment or be unexported (golint)
    • Line 212: warning: exported function Generate should have comment or be unexported (golint)
    • hub/cmd/cmd.go
    • Line 44: warning: exported method Cmd.WithArgs should have comment or be unexported (golint)
    • Line 52: warning: exported method Cmd.Output should have comment or be unexported (golint)
    • Line 61: warning: exported method Cmd.CombinedOutput should have comment or be unexported (golint)
    • Line 68: warning: exported method Cmd.Success should have comment or be unexported (golint)
    • Line 135: warning: exported function New should have comment or be unexported (golint)
    • Line 145: warning: exported function NewWithArray should have comment or be unexported (golint)
    • hub/utils/args_parser.go
    • Line 33: warning: exported type ArgsParser should have comment or be unexported (golint)
    • Line 40: warning: exported method ArgsParser.Parse should have comment or be unexported (golint)
    • Line 136: warning: exported method ArgsParser.RegisterValue should have comment or be unexported (golint)
    • Line 144: warning: exported method ArgsParser.RegisterBool should have comment or be unexported (golint)
    • Line 152: warning: exported method ArgsParser.Value should have comment or be unexported (golint)
    • Line 159: warning: exported method ArgsParser.AllValues should have comment or be unexported (golint)
    • Line 166: warning: exported method ArgsParser.Bool should have comment or be unexported (golint)
    • Line 173: warning: exported method ArgsParser.Int should have comment or be unexported (golint)
    • Line 178: warning: exported method ArgsParser.HasReceived should have comment or be unexported (golint)
    • Line 183: warning: exported function NewArgsParser should have comment or be unexported (golint)
    • Line 190: warning: exported function NewArgsParserWithUsage should have comment or be unexported (golint)
    • hub/github/editor.go
    • Line 18: warning: exported const Scissors should have comment or be unexported (golint)
    • Line 20: warning: exported function NewEditor should have comment or be unexported (golint)
    • Line 49: warning: exported type Editor should have comment or be unexported (golint)
    • Line 59: warning: exported method Editor.AddCommentedSection should have comment or be unexported (golint)
    • Line 71: warning: exported method Editor.DeleteFile should have comment or be unexported (golint)
    • Line 75: warning: exported method Editor.EditContent should have comment or be unexported (golint)
    • hub/fixtures/test_repo.go
    • Line 12: warning: exported type TestRepo should have comment or be unexported (golint)
    • Line 17: warning: exported method TestRepo.AddRemote should have comment or be unexported (golint)
    • Line 30: warning: exported method TestRepo.AddFile should have comment or be unexported (golint)
    • Line 40: warning: exported function SetupTestRepo should have comment 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!