Preparing report...

Report for github.com/knative/test-infra

A+    Excellent!    Found 101 issues across 259 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!


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.

    • test-infra/tools/flaky-test-reporter/github_issue.go
    • Line 398: warning: cyclomatic complexity 21 of function (*GithubIssueHandler).getFlakyIssues() is high (> 15) (gocyclo)
    • Line 464: warning: cyclomatic complexity 18 of function (*GithubIssueHandler).processGithubIssuesForRepo() is high (> 15) (gocyclo)
    • Line 211: warning: cyclomatic complexity 17 of function (*GithubIssueHandler).updateIssue() is high (> 15) (gocyclo)

golint65%

Golint is a linter for Go source code.

    • test-infra/pkg/gcs/mock/mock.go
    • Line 41: warning: exported var MethodNewStorageBucket should have comment or be unexported (golint)
    • Line 69: warning: exported function NewClientMocker should have comment or be unexported (golint)
    • test-infra/tools/coverage/githubUtil/githubFakes/fake.go
    • Line 1: warning: package comment should be of the form "Package githubFakes ..." (golint)
    • Line 16: warning: don't use MixedCaps in package name; githubFakes should be githubfakes (golint)
    • Line 29: warning: exported function FakeGithubClient should have comment or be unexported (golint)
    • Line 52: warning: exported type FakeGithubIssues should have comment or be unexported (golint)
    • Line 56: warning: exported type FakeGithubPullRequests should have comment or be unexported (golint)
    • Line 68: warning: exported method FakeGithubIssues.CreateComment should have comment or be unexported (golint)
    • Line 75: warning: exported method FakeGithubIssues.DeleteComment should have comment or be unexported (golint)
    • Line 82: warning: exported method FakeGithubIssues.ListComments should have comment or be unexported (golint)
    • Line 89: warning: exported method FakeGithubPullRequests.ListFiles should have comment or be unexported (golint)
    • Line 102: warning: exported function FakeRepoData should have comment or be unexported (golint)
    • test-infra/tools/coverage/testTarget/targetPkgs_postsubmit/ling-gen.go
    • Line 1: warning: package comment should be of the form "Package postsubmitTarget ..." (golint)
    • Line 16: warning: don't use MixedCaps in package name; postsubmitTarget should be postsubmittarget (golint)
    • Line 18: warning: don't use underscores in Go names; func fakeFuncLingGen_1 should be fakeFuncLingGen1 (golint)
    • Line 28: warning: don't use underscores in Go names; func fakeFuncLingGen_2 should be fakeFuncLingGen2 (golint)
    • test-infra/tools/config-generator/testgrid_config.go
    • Line 110: warning: exported method TestGridMetaData.EnsureExists should have comment or be unexported (golint)
    • Line 121: warning: exported method TestGridMetaData.EnsureRepo should have comment or be unexported (golint)
    • Line 162: warning: comment on exported method TestGridMetaData.AddNonAlignedTest should be of the form "AddNonAlignedTest ..." (golint)
    • test-infra/tools/coverage/githubUtil/githubClient/client.go
    • Line 1: warning: package comment should be of the form "Package githubClient ..." (golint)
    • Line 16: warning: don't use MixedCaps in package name; githubClient should be githubclient (golint)
    • Line 26: warning: exported type GithubClient should have comment or be unexported (golint)
    • Line 31: warning: exported function New should have comment or be unexported (golint)
    • Line 35: warning: comment on exported function Make should be of the form "Make ..." (golint)
    • Line 49: warning: exported type Issues should have comment or be unexported (golint)
    • Line 58: warning: exported type PullRequests should have comment or be unexported (golint)
    • test-infra/tools/coverage/testTarget/targetPkgs_postsubmit/cov-excl.go
    • Line 1: warning: package comment should be of the form "Package postsubmitTarget ..." (golint)
    • Line 16: warning: don't use MixedCaps in package name; postsubmitTarget should be postsubmittarget (golint)
    • Line 18: warning: don't use underscores in Go names; func fakeFuncCovExcl_1 should be fakeFuncCovExcl1 (golint)
    • Line 26: warning: don't use underscores in Go names; func fakeFuncCovExcl_2 should be fakeFuncCovExcl2 (golint)
    • test-infra/tools/coverage/artifacts/artifacts.go
    • Line 25: warning: exported const CovProfileCompletionMarker should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported type Intf should have comment or be unexported (golint)
    • Line 36: warning: exported type Artifacts should have comment or be unexported (golint)
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • Line 52: warning: exported method Artifacts.SetDirectory should have comment or be unexported (golint)
    • Line 56: warning: exported method Artifacts.Directory should have comment or be unexported (golint)
    • Line 60: warning: exported method Artifacts.ProfilePath should have comment or be unexported (golint)
    • Line 64: warning: exported method Artifacts.KeyProfilePath should have comment or be unexported (golint)
    • Line 68: warning: exported method Artifacts.CovStdoutPath should have comment or be unexported (golint)
    • Line 72: warning: exported method Artifacts.JunitXmlForTestgridPath should have comment or be unexported (golint)
    • Line 76: warning: exported function LineCovFilePath should have comment or be unexported (golint)
    • Line 80: warning: exported method Artifacts.LineCovFilePath should have comment or be unexported (golint)
    • test-infra/pkg/gcs/mock/errors.go
    • Line 31: warning: exported function NewNotEmptyBucketError should have comment or be unexported (golint)
    • Line 39: warning: exported function NewNoBucketError should have comment or be unexported (golint)
    • Line 51: warning: exported function NewBucketExistError should have comment or be unexported (golint)
    • Line 65: warning: exported function NewNoObjectError should have comment or be unexported (golint)
    • test-infra/tools/coverage/test/commons.go
    • Line 1: warning: package comment should be of the form "Package test ..." (golint)
    • Line 30: warning: exported function Fail should have comment or be unexported (golint)
    • Line 34: warning: exported function AssertEqual should have comment or be unexported (golint)
    • Line 40: warning: exported function FileOrDirExists should have comment or be unexported (golint)
    • test-infra/tools/coverage/test/vars.go
    • Line 1: warning: package comment should be of the form "Package test ..." (golint)
    • Line 19: warning: exported const ProfileName should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported var InputArtifactsDir should have comment or be unexported (golint)
    • test-infra/tools/coverage/githubUtil/githubFiles.go
    • Line 1: warning: package comment should be of the form "Package githubUtil ..." (golint)
    • Line 16: warning: don't use MixedCaps in package name; githubUtil should be githubutil (golint)
    • Line 38: warning: comment on exported function GetConcernedFiles should be of the form "GetConcernedFiles ..." (golint)
    • test-infra/tools/coverage/calc/base.go
    • Line 126: warning: exported method Coverage.Ratio should have comment or be unexported (golint)
    • Line 145: warning: exported method Coverage.LineCovLink should have comment or be unexported (golint)
    • Line 149: warning: exported method Coverage.SetLineCovLink should have comment or be unexported (golint)
    • Line 164: warning: exported function SortCoverages should have comment or be unexported (golint)
    • test-infra/tools/dkcm/mainservice/constants.go
    • Line 20: warning: comment on exported const DefaultClusterName should be of the form "DefaultClusterName ..." (golint)
    • Line 22: warning: exported const DefaultNetworkName should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: comment on exported const Ready should be of the form "Ready ..." (golint)
    • Line 36: warning: comment on exported const Status should be of the form "Status ..." (golint)
    • Line 40: warning: comment on exported const CheckInterval should be of the form "CheckInterval ..." (golint)
    • test-infra/tools/coverage/githubUtil/githubPr/githubRepo.go
    • Line 1: warning: package comment should be of the form "Package githubPr ..." (golint)
    • Line 16: warning: don't use MixedCaps in package name; githubPr should be githubpr (golint)
    • Line 30: warning: exported type GithubPr should have comment or be unexported (golint)
    • Line 39: warning: exported method GithubPr.PrStr should have comment or be unexported (golint)
    • Line 43: warning: exported function New should have comment or be unexported (golint)
    • Line 121: warning: comment on exported method GithubPr.CleanAndPostComment should be of the form "CleanAndPostComment ..." (golint)
    • test-infra/tools/coverage/line/line.go
    • Line 1: warning: package comment should be of the form "Package line ..." (golint)
    • Line 29: warning: exported function CreateLineCovFile should have comment or be unexported (golint)
    • Line 44: warning: exported function GenerateLineCovLinks should have comment or be unexported (golint)
    • test-infra/pkg/mysql/client.go
    • Line 26: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 69: warning: exported method DBConfig.TestConn should have comment or be unexported (golint)
    • Line 79: warning: exported method DBConfig.Connect should have comment or be unexported (golint)
    • test-infra/tools/coverage/calc/group.go
    • Line 1: warning: package comment should be of the form "Package calc ..." (golint)
    • Line 47: warning: exported method CoverageList.CovThresInt should have comment or be unexported (golint)
    • Line 82: warning: exported method CoverageList.Percentage should have comment or be unexported (golint)
    • test-infra/tools/coverage/gcs/gcs.go
    • Line 32: warning: exported type StorageClient should have comment or be unexported (golint)
    • Line 38: warning: exported type Client should have comment or be unexported (golint)
    • Line 45: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 54: warning: exported method Client.ListGcsObjects should have comment or be unexported (golint)
    • Line 78: warning: exported method Client.ProfileReader should have comment or be unexported (golint)
    • Line 99: warning: exported type GcsBuild should have comment or be unexported (golint)
    • Line 107: warning: exported type GcsArtifacts should have comment or be unexported (golint)
    • Line 114: warning: exported function NewGcsArtifacts should have comment or be unexported (golint)
    • Line 119: warning: exported method GcsArtifacts.ProfileReader should have comment or be unexported (golint)
    • test-infra/tools/dkcm/clerk/cluster.go
    • Line 30: warning: comment on exported type ClusterOption should be of the form "ClusterOption ..." (with optional leading article) (golint)
    • Line 33: warning: comment on exported function NewCluster should be of the form "NewCluster ..." (golint)
    • Line 48: warning: comment on exported function AddProjectID should be of the form "AddProjectID ..." (golint)
    • Line 55: warning: comment on exported function AddStatus should be of the form "AddStatus ..." (golint)
    • test-infra/tools/coverage/test/io.go
    • Line 1: warning: package comment should be of the form "Package test ..." (golint)
    • Line 25: warning: exported function DeleteDir should have comment or be unexported (golint)
    • Line 32: warning: exported function MkdirAll should have comment or be unexported (golint)
    • Line 47: warning: exported function LinkInputArts should have comment or be unexported (golint)
    • Line 54: warning: exported function NewArtsDir should have comment or be unexported (golint)
    • test-infra/tools/config-generator/types.go
    • Line 32: warning: comment on exported type JobDetailMap should be of the form "JobDetailMap ..." (with optional leading article) (golint)
    • Line 35: warning: comment on exported type TestGridMetaData should be of the form "TestGridMetaData ..." (with optional leading article) (golint)
    • Line 46: warning: exported type NonAlignedTestGroup should have comment or be unexported (golint)
    • Line 61: warning: exported type GoVersion should have comment or be unexported (golint)
    • Line 66: warning: exported method JobDetailMap.Add should have comment or be unexported (golint)
    • Line 71: warning: exported function NewJobDetailMap should have comment or be unexported (golint)
    • Line 84: warning: exported function NewTestGridMetaData should have comment or be unexported (golint)
    • Line 97: warning: exported method GoVersion.Equals should have comment or be unexported (golint)
    • test-infra/tools/dkcm/mainservice/mainservice.go
    • Line 41: warning: exported var DefaultClusterParams should have comment or be unexported (golint)
    • Line 44: warning: comment on exported type ServiceResponse should be of the form "ServiceResponse ..." (with optional leading article) (golint)
    • Line 51: warning: exported function Start should have comment or be unexported (golint)
    • Line 119: warning: comment on exported function CreateCluster should be of the form "CreateCluster ..." (golint)
    • Line 165: warning: comment on exported function AssignCluster should be of the form "AssignCluster ..." (golint)
    • test-infra/tools/coverage/artifacts/artsTest/artsTest.go
    • Line 1: warning: package comment should be of the form "Package artsTest ..." (golint)
    • Line 17: warning: don't use MixedCaps in package name; artsTest should be artstest (golint)
    • Line 24: warning: exported type LocalArtifacts should have comment or be unexported (golint)
    • Line 26: warning: exported var NewArtifacts should have comment or be unexported (golint)
    • Line 28: warning: exported function LocalArtsForTest should have comment or be unexported (golint)
    • Line 37: warning: exported function LocalInputArtsForTest should have comment or be unexported (golint)
    • Line 46: warning: exported function LocalArtsForTest_KeyfileNotExist should have comment or be unexported (golint)
    • Line 46: warning: don't use underscores in Go names; func LocalArtsForTest_KeyfileNotExist should be LocalArtsForTestKeyfileNotExist (golint)
    • test-infra/tools/dkcm/clerk/sql_params.go
    • Line 23: warning: comment on exported type QueryClusterParamsOption should be of the form "QueryClusterParamsOption ..." (with optional leading article) (golint)
    • Line 26: warning: comment on exported type UpdateOption should be of the form "UpdateOption ..." (with optional leading article) (golint)
    • Line 29: warning: comment on exported function UpdateStringField should be of the form "UpdateStringField ..." (golint)
    • Line 36: warning: comment on exported function UpdateNumField should be of the form "UpdateNumField ..." (golint)
    • Line 43: warning: comment on exported function QueryZone should be of the form "QueryZone ..." (golint)
    • Line 50: warning: comment on exported function QueryNodes should be of the form "QueryNodes ..." (golint)
    • Line 57: warning: comment on exported function QueryNodeType should be of the form "QueryNodeType ..." (golint)
    • test-infra/tools/coverage/artifacts/local.go
    • Line 1: warning: package comment should be of the form "Package artifacts ..." (golint)
    • Line 28: warning: exported type LocalArtifacts should have comment or be unexported (golint)
    • Line 32: warning: exported function NewLocalArtifacts should have comment or be unexported (golint)
    • Line 51: warning: exported method LocalArtifacts.ProfileName should have comment or be unexported (golint)
    • test-infra/tools/dkcm/clerk/clerk.go
    • Line 32: warning: exported type Operations should have comment or be unexported (golint)
    • Line 112: warning: comment on exported method DBClient.CheckAvail should be of the form "CheckAvail ..." (golint)
    • Line 127: warning: comment on exported method DBClient.CheckNumStatus should be of the form "CheckNumStatus ..." (golint)
    • Line 142: warning: comment on exported method DBClient.InsertCluster should be of the form "InsertCluster ..." (golint)
    • Line 214: warning: comment on exported method DBClient.GetCluster should be of the form "GetCluster ..." (golint)
    • Line 247: warning: comment on exported method DBClient.InsertRequest should be of the form "InsertRequest ..." (golint)
    • Line 260: warning: comment on exported method DBClient.UpdateRequest should be of the form "UpdateRequest ..." (golint)
    • Line 267: warning: comment on exported method DBClient.GetRequest should be of the form "GetRequest ..." (golint)
    • Line 279: warning: comment on exported method DBClient.ListRequests should be of the form "ListRequests ..." (golint)
    • Line 300: warning: comment on exported method DBClient.PriorityRanking should be of the form "PriorityRanking ..." (golint)
    • Line 316: warning: comment on exported method DBClient.ClearTimeOut should be of the form "ClearTimeOut ..." (golint)
    • test-infra/tools/dkcm/clerk/request.go
    • Line 32: warning: comment on exported type RequestOption should be of the form "RequestOption ..." (with optional leading article) (golint)
    • Line 35: warning: comment on exported function NewRequest should be of the form "NewRequest ..." (golint)
    • Line 44: warning: comment on exported function AddRequestTime should be of the form "AddRequestTime ..." (golint)
    • Line 51: warning: comment on exported function AddProwJobID should be of the form "AddProwJobID ..." (golint)
    • test-infra/tools/coverage/gcs/gcsPresubmit.go
    • Line 33: warning: exported const ArtifactsDirNameOnGcs should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: exported type PresubmitBuild should have comment or be unexported (golint)
    • Line 43: warning: exported type PreSubmit should have comment or be unexported (golint)
    • Line 53: warning: exported method PreSubmit.MakeGcsArtifacts should have comment or be unexported (golint)
    • Line 63: warning: exported method PreSubmit.UrlGcsLineCovLinkWithMarker should have comment or be unexported (golint)
    • test-infra/tools/coverage/test/env.go
    • Line 1: warning: package comment should be of the form "Package test ..." (golint)
    • Line 26: warning: exported function ProjDir should have comment or be unexported (golint)
    • Line 34: warning: exported function AbsPath should have comment or be unexported (golint)
    • test-infra/tools/dkcm/clerk/cluster_params.go
    • Line 27: warning: comment on exported type ClusterParamsOption should be of the form "ClusterParamsOption ..." (with optional leading article) (golint)
    • Line 30: warning: comment on exported function NewClusterParams should be of the form "NewClusterParams ..." (golint)
    • Line 39: warning: comment on exported function AddZone should be of the form "AddZone ..." (golint)
    • Line 46: warning: comment on exported function AddNodes should be of the form "AddNodes ..." (golint)
    • Line 53: warning: comment on exported function AddNodeType should be of the form "AddNodeType ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!