Preparing report...

Report for github.com/istio/bots

A+    Excellent!    Found 60 issues across 102 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!


gocyclo92%

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.

    • bots/policybot/mgrs/syncmgr/mgr.go
    • Line 436: warning: cyclomatic complexity 33 of function (*syncState).handleEventsFromBigQuery() is high (> 15) (gocyclo)
    • Line 649: warning: cyclomatic complexity 32 of function (*syncState).handleEventsFromGitHub() is high (> 15) (gocyclo)
    • Line 1116: warning: cyclomatic complexity 22 of function (*syncState).handlePostSubmitTestResults() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 21 of function (*SyncMgr).Sync() is high (> 15) (gocyclo)
    • Line 1003: warning: cyclomatic complexity 17 of function (*syncState).handleTestResults() is high (> 15) (gocyclo)

golint43%

Golint is a linter for Go source code.

    • bots/policybot/dashboard/topics/issues/topic.go
    • Line 86: warning: exported method Issues.RenderList should have comment or be unexported (golint)
    • Line 113: warning: exported method Issues.RenderNeedsEscalation should have comment or be unexported (golint)
    • Line 140: warning: exported method Issues.RenderTriage should have comment or be unexported (golint)
    • Line 167: warning: exported method Issues.RenderStale should have comment or be unexported (golint)
    • Line 194: warning: exported method Issues.RenderSummary should have comment or be unexported (golint)
    • bots/policybot/dashboard/topics/postsubmit/topic.go
    • Line 49: warning: comment on exported type LatestBaseShaSummary should be of the form "LatestBaseShaSummary ..." (with optional leading article) (golint)
    • Line 54: warning: comment on exported type LatestBaseSha should be of the form "LatestBaseSha ..." (with optional leading article) (golint)
    • Line 61: warning: comment on exported type BaseShas should be of the form "BaseShas ..." (with optional leading article) (golint)
    • Line 66: warning: comment on exported type LabelEnvSummary should be of the form "LabelEnvSummary ..." (with optional leading article) (golint)
    • Line 76: warning: comment on exported type LabelEnv should be of the form "LabelEnv ..." (with optional leading article) (golint)
    • Line 135: warning: exported method PostSubmit.RenderLabelEnv should have comment or be unexported (golint)
    • Line 158: warning: exported method PostSubmit.RenderAllBaseSha should have comment or be unexported (golint)
    • Line 174: warning: exported method PostSubmit.RenderLatestBaseSha should have comment or be unexported (golint)
    • bots/policybot/pkg/pipeline/producer.go
    • Line 15: warning: package comment should be of the form "Package pipeline ..." (golint)
    • Line 28: warning: exported var ErrSkip should have comment or be unexported (golint)
    • Line 30: warning: exported type IterProducer should have comment or be unexported (golint)
    • Line 35: warning: exported type InResult should have comment or be unexported (golint)
    • Line 40: warning: exported type OutResult should have comment or be unexported (golint)
    • Line 45: warning: exported type InOutResult should have comment or be unexported (golint)
    • Line 73: warning: exported function NewOut should have comment or be unexported (golint)
    • Line 80: warning: exported method IterProducer.Start should have comment or be unexported (golint)
    • Line 120: warning: exported function BuildSlice should have comment or be unexported (golint)
    • Line 131: warning: exported function BuildProducer should have comment or be unexported (golint)
    • bots/policybot/pkg/cmdutil/util.go
    • Line 42: warning: exported type CommonFlags should have comment or be unexported (golint)
    • Line 45: warning: exported const ConfigRepo should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported function Run should have comment or be unexported (golint)
    • bots/policybot/pkg/resultgatherer/resultgatherer.go
    • Line 99: warning: exported type TestResultGatherer should have comment or be unexported (golint)
    • Line 110: warning: exported method TestResultGatherer.GetTestsForPR should have comment or be unexported (golint)
    • Line 358: warning: exported method TestResultGatherer.GetTestResult should have comment or be unexported (golint)
    • Line 459: warning: exported method TestResultGatherer.AddChildSuiteOutcome should have comment or be unexported (golint)
    • Line 470: warning: exported method TestResultGatherer.AddChildTestOutcome should have comment or be unexported (golint)
    • Line 482: warning: exported method TestResultGatherer.AddChildFeatureLabel should have comment or be unexported (golint)
    • Line 495: warning: exported method TestResultGatherer.GetPostSubmitTestResult should have comment or be unexported (golint)
    • Line 628: warning: comment on exported method TestResultGatherer.CheckTestResultsForPr should be of the form "CheckTestResultsForPr ..." (golint)
    • Line 641: warning: exported method TestResultGatherer.CheckPostSubmitTestResults should have comment or be unexported (golint)
    • Line 650: warning: exported method TestResultGatherer.GetAllPullRequestsChan should have comment or be unexported (golint)
    • Line 654: warning: exported method TestResultGatherer.GetAllPostSubmitTestChan should have comment or be unexported (golint)
    • bots/policybot/dashboard/topics/members/topic.go
    • Line 92: warning: comment on exported method Members.RenderSingle should be of the form "RenderSingle ..." (golint)
    • Line 128: warning: comment on exported method Members.RenderList should be of the form "RenderList ..." (golint)
    • Line 176: warning: comment on exported method Members.GetList should be of the form "GetList ..." (golint)
    • bots/policybot/pkg/storage/types.go
    • Line 34: warning: exported type Issue should have comment or be unexported (golint)
    • Line 49: warning: exported type IssueComment should have comment or be unexported (golint)
    • Line 60: warning: exported type User should have comment or be unexported (golint)
    • Line 67: warning: exported type Label should have comment or be unexported (golint)
    • Line 75: warning: exported type Org should have comment or be unexported (golint)
    • Line 82: warning: exported type Repo should have comment or be unexported (golint)
    • Line 89: warning: exported type PullRequest should have comment or be unexported (golint)
    • Line 110: warning: exported type PullRequestReviewComment should have comment or be unexported (golint)
    • Line 121: warning: exported type PullRequestReview should have comment or be unexported (golint)
    • Line 132: warning: exported type Member should have comment or be unexported (golint)
    • Line 138: warning: comment on exported type Monitor should be of the form "Monitor ..." (with optional leading article) (golint)
    • Line 180: warning: exported type BotActivity should have comment or be unexported (golint)
    • Line 188: warning: exported type Maintainer should have comment or be unexported (golint)
    • Line 196: warning: exported type TimedEntry should have comment or be unexported (golint)
    • Line 201: warning: exported type RepoPathActivityInfo should have comment or be unexported (golint)
    • Line 206: warning: exported type RepoActivityInfo should have comment or be unexported (golint)
    • Line 213: warning: exported type ActivityInfo should have comment or be unexported (golint)
    • Line 218: warning: exported type TestResult should have comment or be unexported (golint)
    • Line 239: warning: exported type PostSubmitTestResult should have comment or be unexported (golint)
    • Line 258: warning: exported type SuiteOutcome should have comment or be unexported (golint)
    • Line 270: warning: exported type TestOutcome should have comment or be unexported (golint)
    • Line 283: warning: exported type FeatureLabel should have comment or be unexported (golint)
    • Line 296: warning: exported type PostSubtmitAllResult should have comment or be unexported (golint)
    • Line 303: warning: exported type TestOutcomeFeatureLabel should have comment or be unexported (golint)
    • Line 308: warning: exported type RepoComment should have comment or be unexported (golint)
    • Line 318: warning: exported type RepoCommentEvent should have comment or be unexported (golint)
    • Line 327: warning: exported type PullRequestReviewEvent should have comment or be unexported (golint)
    • Line 337: warning: exported type PullRequestEvent should have comment or be unexported (golint)
    • Line 347: warning: exported type PullRequestReviewCommentEvent should have comment or be unexported (golint)
    • Line 357: warning: exported type IssueCommentEvent should have comment or be unexported (golint)
    • Line 367: warning: exported type IssueEvent should have comment or be unexported (golint)
    • Line 376: warning: exported type CoverageData should have comment or be unexported (golint)
    • Line 389: warning: exported type UserAffiliation should have comment or be unexported (golint)
    • Line 397: warning: exported type BaseSha should have comment or be unexported (golint)
    • Line 401: warning: exported type LatestBaseSha should have comment or be unexported (golint)
    • Line 407: warning: exported type PostSubmitTestEnvLabel should have comment or be unexported (golint)
    • Line 412: warning: exported type LatestBaseShaSummary should have comment or be unexported (golint)
    • Line 416: warning: exported type TestNameByEnvLabel should have comment or be unexported (golint)
    • Line 422: warning: exported type ConfirmedFlake should have comment or be unexported (golint)
    • bots/policybot/pkg/util/httperror.go
    • Line 24: warning: comment on exported type HTTPError should be of the form "HTTPError ..." (with optional leading article) (golint)
    • Line 30: warning: exported function HTTPErrorf should have comment or be unexported (golint)
    • Line 37: warning: exported function RenderError should have comment or be unexported (golint)
    • bots/policybot/pkg/config/duration.go
    • Line 23: warning: comment on exported type Duration should be of the form "Duration ..." (with optional leading article) (golint)
    • Line 26: warning: exported method Duration.MarshalJSON should have comment or be unexported (golint)
    • Line 30: warning: exported method Duration.UnmarshalJSON should have comment or be unexported (golint)
    • bots/policybot/pkg/testflakes/testflakes.go
    • Line 15: warning: package comment should be of the form "Package testflakes ..." (golint)
    • Line 48: warning: exported type FlakeTester should have comment or be unexported (golint)
    • Line 58: warning: exported function NewFlakeTester should have comment or be unexported (golint)
    • Line 70: warning: comment on exported method FlakeTester.ProcessResults should be of the form "ProcessResults ..." (golint)
    • Line 109: warning: comment on exported method FlakeTester.CheckResults should be of the form "CheckResults ..." (golint)
    • Line 174: warning: comment on exported method FlakeTester.ReportFlake should be of the form "ReportFlake ..." (golint)
    • bots/policybot/pkg/config/recordbase.go
    • Line 17: warning: exported type RecordBase should have comment or be unexported (golint)
    • Line 23: warning: exported method RecordBase.GetRepos should have comment or be unexported (golint)
    • Line 27: warning: exported method RecordBase.GetName should have comment or be unexported (golint)
    • Line 31: warning: exported method RecordBase.GetType should have comment or be unexported (golint)
    • bots/policybot/pkg/coverage/config.go
    • Line 30: warning: exported type Config should have comment or be unexported (golint)
    • Line 32: warning: exported type Feature should have comment or be unexported (golint)
    • Line 36: warning: exported type Stage should have comment or be unexported (golint)
    • Line 43: warning: exported function GetConfig should have comment or be unexported (golint)
    • bots/policybot/mgrs/userdatamgr/record.go
    • Line 26: warning: exported type Time should have comment or be unexported (golint)
    • Line 55: warning: exported method Time.MarshalJSON should have comment or be unexported (golint)
    • Line 59: warning: exported method Time.UnmarshalJSON should have comment or be unexported (golint)
    • bots/policybot/pkg/storage/cache/cache.go
    • Line 27: warning: comment on exported type Cache should be of the form "Cache ..." (with optional leading article) (golint)
    • Line 47: warning: exported function New should have comment or be unexported (golint)
    • Line 75: warning: comment on exported method Cache.ReadOrg should be of the form "ReadOrg ..." (golint)
    • Line 90: warning: comment on exported method Cache.ReadRepo should be of the form "ReadRepo ..." (golint)
    • Line 105: warning: comment on exported method Cache.WriteRepoComments should be of the form "WriteRepoComments ..." (golint)
    • Line 117: warning: comment on exported method Cache.ReadUser should be of the form "ReadUser ..." (golint)
    • Line 132: warning: comment on exported method Cache.WriteUsers should be of the form "WriteUsers ..." (golint)
    • Line 144: warning: comment on exported method Cache.ReadLabel should be of the form "ReadLabel ..." (golint)
    • Line 159: warning: comment on exported method Cache.ReadIssue should be of the form "ReadIssue ..." (golint)
    • Line 174: warning: comment on exported method Cache.WriteIssues should be of the form "WriteIssues ..." (golint)
    • Line 186: warning: comment on exported method Cache.ReadIssueComment should be of the form "ReadIssueComment ..." (golint)
    • Line 202: warning: comment on exported method Cache.WriteIssueComments should be of the form "WriteIssueComments ..." (golint)
    • Line 215: warning: comment on exported method Cache.ReadPullRequest should be of the form "ReadPullRequest ..." (golint)
    • Line 230: warning: comment on exported method Cache.WritePullRequests should be of the form "WritePullRequests ..." (golint)
    • Line 242: warning: comment on exported method Cache.ReadPullRequestReviewComment should be of the form "ReadPullRequestReviewComment ..." (golint)
    • Line 258: warning: comment on exported method Cache.WritePullRequestReviewComments should be of the form "WritePullRequestReviewComments ..." (golint)
    • Line 273: warning: comment on exported method Cache.ReadPullRequestReview should be of the form "ReadPullRequestReview ..." (golint)
    • Line 289: warning: comment on exported method Cache.WritePullRequestReviews should be of the form "WritePullRequestReviews ..." (golint)
    • Line 304: warning: exported method Cache.ReadTestResult should have comment or be unexported (golint)
    • Line 319: warning: comment on exported method Cache.WriteTestResults should be of the form "WriteTestResults ..." (golint)
    • Line 338: warning: comment on exported method Cache.ReadMaintainer should be of the form "ReadMaintainer ..." (golint)
    • Line 353: warning: comment on exported method Cache.ReadMember should be of the form "ReadMember ..." (golint)
    • Line 368: warning: exported method Cache.WriteLatestBaseShas should have comment or be unexported (golint)
    • Line 375: warning: exported method Cache.ReadLatestBaseShas should have comment or be unexported (golint)
    • bots/policybot/pkg/gh/convert.go
    • Line 25: warning: comment on exported function ConvertIssue should be of the form "ConvertIssue ..." (golint)
    • Line 53: warning: comment on exported function ConvertIssueComment should be of the form "ConvertIssueComment ..." (golint)
    • Line 67: warning: comment on exported function ConvertRepoComment should be of the form "ConvertRepoComment ..." (golint)
    • Line 80: warning: comment on exported function ConvertUser should be of the form "ConvertUser ..." (golint)
    • Line 90: warning: comment on exported function ConvertOrg should be of the form "ConvertOrg ..." (golint)
    • Line 100: warning: comment on exported function ConvertRepo should be of the form "ConvertRepo ..." (golint)
    • Line 110: warning: comment on exported function ConvertLabel should be of the form "ConvertLabel ..." (golint)
    • Line 121: warning: comment on exported function ConvertPullRequest should be of the form "ConvertPullRequest ..." (golint)
    • Line 167: warning: comment on exported function ConvertPullRequestReviewComment should be of the form "ConvertPullRequestReviewComment ..." (golint)
    • Line 182: warning: comment on exported function ConvertPullRequestReview should be of the form "ConvertPullRequestReview ..." (golint)
    • bots/policybot/pkg/gh/fetch.go
    • Line 25: warning: exported method ThrottledClient.FetchRepoComments should have comment or be unexported (golint)
    • Line 50: warning: exported method ThrottledClient.FetchRepoEvents should have comment or be unexported (golint)
    • Line 75: warning: exported method ThrottledClient.FetchIssueEvents should have comment or be unexported (golint)
    • Line 100: warning: exported method ThrottledClient.FetchMembers should have comment or be unexported (golint)
    • Line 127: warning: exported method ThrottledClient.FetchLabels should have comment or be unexported (golint)
    • Line 152: warning: exported method ThrottledClient.FetchIssues should have comment or be unexported (golint)
    • Line 181: warning: exported method ThrottledClient.FetchIssueComments should have comment or be unexported (golint)
    • Line 210: warning: exported method ThrottledClient.FetchPullRequestReviewComments should have comment or be unexported (golint)
    • Line 239: warning: exported method ThrottledClient.FetchFiles should have comment or be unexported (golint)
    • Line 269: warning: exported method ThrottledClient.FetchPullRequests should have comment or be unexported (golint)
    • Line 299: warning: exported method ThrottledClient.FetchReviews should have comment or be unexported (golint)
    • bots/policybot/pkg/config/registry.go
    • Line 33: warning: exported type Record should have comment or be unexported (golint)
    • Line 37: warning: exported type RecordCardinality should have comment or be unexported (golint)
    • Line 40: warning: exported const GlobalSingleton should have comment (or a comment on this block) or be unexported (golint)
    • Line 45: warning: exported type RecordFactory should have comment or be unexported (golint)
    • Line 56: warning: exported type Registry should have comment or be unexported (golint)
    • Line 66: warning: exported function RegisterType should have comment or be unexported (golint)
    • Line 73: warning: exported function LoadRegistryFromRepo should have comment or be unexported (golint)
    • Line 124: warning: exported function LoadRegistryFromDirectory should have comment or be unexported (golint)
    • Line 256: warning: exported method Registry.Records should have comment or be unexported (golint)
    • Line 270: warning: exported method Registry.SingleRecord should have comment or be unexported (golint)
    • Line 283: warning: exported method Registry.GlobalRecord should have comment or be unexported (golint)
    • Line 288: warning: exported method Registry.Repos should have comment or be unexported (golint)
    • Line 292: warning: exported method Registry.Core should have comment or be unexported (golint)
    • Line 296: warning: exported method Registry.OriginRepo should have comment or be unexported (golint)
    • Line 300: warning: exported method Registry.OriginPath should have comment or be unexported (golint)
    • bots/policybot/mgrs/syncmgr/mgr.go
    • Line 56: warning: exported type FilterFlags should have comment or be unexported (golint)
    • Line 83: warning: exported function New should have comment or be unexported (golint)
    • Line 100: warning: exported function ConvFilterFlags should have comment or be unexported (golint)
    • Line 135: warning: exported method SyncMgr.Sync should have comment or be unexported (golint)
    • bots/policybot/mgrs/lifecyclemgr/mgr.go
    • Line 50: warning: exported function New should have comment or be unexported (golint)
    • Line 59: warning: exported method LifecycleMgr.ManageAll should have comment or be unexported (golint)
    • Line 92: warning: exported method LifecycleMgr.ManageIssue should have comment or be unexported (golint)
    • bots/policybot/dashboard/topics/maintainers/topic.go
    • Line 91: warning: comment on exported method Maintainers.RenderSingle should be of the form "RenderSingle ..." (golint)
    • Line 127: warning: comment on exported method Maintainers.RenderList should be of the form "RenderList ..." (golint)
    • Line 180: warning: comment on exported method Maintainers.GetList should be of the form "GetList ..." (golint)
    • bots/policybot/pkg/pipeline/pipeline.go
    • Line 15: warning: package comment should be of the form "Package pipeline ..." (golint)
    • Line 29: warning: exported type Impl should have comment or be unexported (golint)
    • Line 39: warning: exported method Impl.Expand should have comment or be unexported (golint)
    • Line 116: warning: comment on exported method Impl.WithContext should be of the form "WithContext ..." (golint)
    • Line 122: warning: exported method Impl.WithBuffer should have comment or be unexported (golint)
    • Line 127: warning: exported method Impl.WithParallelism should have comment or be unexported (golint)
    • Line 132: warning: exported type StringPipelineEnder should have comment or be unexported (golint)
    • Line 141: warning: exported method StringPipelineEnder.WithContext should have comment or be unexported (golint)
    • Line 146: warning: exported method StringPipelineEnder.WithBuffer should have comment or be unexported (golint)
    • Line 151: warning: exported method StringPipelineEnder.WithParallelism should have comment or be unexported (golint)
    • Line 156: warning: exported method StringPipelineEnder.OnError should have comment or be unexported (golint)
    • Line 161: warning: exported method StringPipelineEnder.Go should have comment or be unexported (golint)
    • Line 167: warning: exported method Impl.Go should have comment or be unexported (golint)
    • Line 175: warning: exported method Impl.OnError should have comment or be unexported (golint)
    • Line 187: warning: exported method Impl.Batch should have comment or be unexported (golint)
    • Line 220: warning: exported method Impl.Transform should have comment or be unexported (golint)
    • Line 242: warning: exported method Impl.To should have comment or be unexported (golint)
    • Line 273: warning: exported function FromChan should have comment or be unexported (golint)
    • Line 292: warning: exported function FromIter should have comment or be unexported (golint)
    • Line 301: warning: exported function From should have comment or be unexported (golint)
    • bots/policybot/pkg/pipeline/transformer.go
    • Line 15: warning: package comment should be of the form "Package pipeline ..." (golint)
    • Line 26: warning: exported type StringLogTransformer should have comment or be unexported (golint)
    • Line 33: warning: exported method StringLogTransformer.Transform 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!