Preparing report...

Report for github.com/merico-dev/lake

A    Great!    Found 89 issues across 98 files

Tweet

gofmt94%

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!


gocyclo96%

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.


golint12%

Golint is a linter for Go source code.

    • lake/plugins/core/apiclient.go
    • Line 16: warning: exported type ApiClientBeforeRequest should have comment or be unexported (golint)
    • Line 17: warning: exported type ApiClientAfterResponse should have comment or be unexported (golint)
    • Line 19: warning: exported type ApiClient should have comment or be unexported (golint)
    • Line 28: warning: exported function NewApiClient should have comment or be unexported (golint)
    • Line 44: warning: exported method ApiClient.Setup should have comment or be unexported (golint)
    • Line 56: warning: exported method ApiClient.SetEndpoint should have comment or be unexported (golint)
    • Line 60: warning: exported method ApiClient.SetTimeout should have comment or be unexported (golint)
    • Line 60: warning: receiver name ApiClient should be consistent with previous receiver name apiClient for ApiClient (golint)
    • Line 64: warning: exported method ApiClient.SetMaxRetry should have comment or be unexported (golint)
    • Line 64: warning: receiver name ApiClient should be consistent with previous receiver name apiClient for ApiClient (golint)
    • Line 68: warning: exported method ApiClient.SetHeaders should have comment or be unexported (golint)
    • Line 72: warning: exported method ApiClient.SetProxy should have comment or be unexported (golint)
    • Line 81: warning: exported method ApiClient.Do should have comment or be unexported (golint)
    • Line 144: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 160: warning: exported method ApiClient.Get should have comment or be unexported (golint)
    • Line 168: warning: exported function UnmarshalResponse should have comment or be unexported (golint)
    • lake/plugins/github/utils/utils.go
    • Line 12: warning: exported type PagingInfo should have comment or be unexported (golint)
    • Line 19: warning: exported type RateLimitInfo should have comment or be unexported (golint)
    • Line 25: warning: exported function ConvertRateLimitInfo should have comment or be unexported (golint)
    • Line 56: warning: exported function GetRateLimitPerSecond should have comment or be unexported (golint)
    • Line 65: warning: exported function ConvertStringToInt should have comment or be unexported (golint)
    • Line 68: warning: exported function GetPagingFromLinkHeader should have comment or be unexported (golint)
    • Line 112: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lake/plugins/domainlayer/domainlayer.go
    • Line 8: warning: comment on exported type DomainLayer should be of the form "DomainLayer ..." (with optional leading article) (golint)
    • Line 11: warning: exported method DomainLayer.Init should have comment or be unexported (golint)
    • Line 23: warning: exported method DomainLayer.Description should have comment or be unexported (golint)
    • Line 27: warning: exported method DomainLayer.Execute should have comment or be unexported (golint)
    • Line 31: warning: comment on exported var PluginEntry should be of the form "PluginEntry ..." (golint)
    • lake/config/config.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 10: warning: exported var V should have comment or be unexported (golint)
    • lake/plugins/jira/jira.go
    • Line 11: warning: exported type JiraOptions should have comment or be unexported (golint)
    • Line 16: warning: comment on exported type Jira should be of the form "Jira ..." (with optional leading article) (golint)
    • Line 19: warning: exported method Jira.Init should have comment or be unexported (golint)
    • Line 32: warning: exported method Jira.Description should have comment or be unexported (golint)
    • Line 36: warning: exported method Jira.Execute should have comment or be unexported (golint)
    • Line 101: warning: comment on exported var PluginEntry should be of the form "PluginEntry ..." (golint)
    • lake/api/task/task.go
    • Line 13: warning: exported function Post should have comment or be unexported (golint)
    • Line 37: warning: exported function Get should have comment or be unexported (golint)
    • lake/errors/errors.go
    • Line 5: warning: exported type Error should have comment or be unexported (golint)
    • Line 10: warning: exported method Error.Code should have comment or be unexported (golint)
    • Line 18: warning: exported function NewError should have comment or be unexported (golint)
    • Line 25: warning: exported var InternalError should have comment or be unexported (golint)
    • lake/plugins/jenkins/tasks/worker.go
    • Line 12: warning: exported type JenkinsWorker should have comment or be unexported (golint)
    • Line 17: warning: exported function NewJenkinsWorker should have comment or be unexported (golint)
    • Line 24: warning: exported method JenkinsWorker.SyncJobs should have comment or be unexported (golint)
    • lake/plugins/plugins.go
    • Line 15: warning: should not use dot imports (golint)
    • Line 54: warning: exported function RunPlugin should have comment or be unexported (golint)
    • Line 66: warning: exported function PluginDir should have comment or be unexported (golint)
    • lake/plugins/jira/tasks/jiraapiclient.go
    • Line 16: warning: exported type JiraApiClient should have comment or be unexported (golint)
    • Line 22: warning: exported function GetJiraApiClient should have comment or be unexported (golint)
    • Line 37: warning: exported type JiraPagination should have comment or be unexported (golint)
    • Line 43: warning: exported type JiraPaginationHandler should have comment or be unexported (golint)
    • Line 45: warning: exported method JiraApiClient.FetchPages should have comment or be unexported (golint)
    • lake/utils/worker_scheduler.go
    • Line 9: warning: exported type WorkerScheduler should have comment or be unexported (golint)
    • Line 45: warning: exported method WorkerScheduler.Submit should have comment or be unexported (golint)
    • Line 59: warning: exported method WorkerScheduler.WaitUntilFinish should have comment or be unexported (golint)
    • Line 63: warning: exported method WorkerScheduler.Release should have comment or be unexported (golint)
    • lake/plugins/jira/tasks/jirachangelogcollector.go
    • Line 17: warning: exported type JiraApiAuthor should have comment or be unexported (golint)
    • Line 26: warning: exported type JiraApiChangelogItem should have comment or be unexported (golint)
    • Line 36: warning: exported type JiraApiChangeLog should have comment or be unexported (golint)
    • Line 43: warning: exported type JiraApiChangelogsResponse should have comment or be unexported (golint)
    • Line 48: warning: exported function CollectChangelogs should have comment or be unexported (golint)
    • lake/api/api.go
    • Line 8: warning: exported function CreateApiService should have comment or be unexported (golint)
    • lake/models/base.go
    • Line 5: warning: exported type Model should have comment or be unexported (golint)
    • Line 11: warning: exported type NoPKModel should have comment or be unexported (golint)
    • lake/plugins/gitlab/tasks/gitlab_api_client.go
    • Line 17: warning: exported type GitlabApiClient should have comment or be unexported (golint)
    • Line 23: warning: exported function CreateApiClient should have comment or be unexported (golint)
    • Line 38: warning: exported type GitlabPaginationHandler should have comment or be unexported (golint)
    • Line 43: warning: don't use underscores in Go names; var page_size should be pageSize (golint)
    • Line 86: warning: comment on exported method GitlabApiClient.FetchWithPaginationAnts should be of the form "FetchWithPaginationAnts ..." (golint)
    • Line 174: warning: comment on exported method GitlabApiClient.FetchWithPagination should be of the form "FetchWithPagination ..." (golint)
    • lake/plugins/compound/compound.go
    • Line 13: warning: comment on exported type Compound should be of the form "Compound ..." (with optional leading article) (golint)
    • Line 16: warning: exported method Compound.Init should have comment or be unexported (golint)
    • Line 69: warning: exported method Compound.Description should have comment or be unexported (golint)
    • Line 73: warning: exported method Compound.Execute should have comment or be unexported (golint)
    • Line 77: warning: comment on exported var PluginEntry should be of the form "PluginEntry ..." (golint)
    • lake/plugins/github/tasks/github_commits_collector.go
    • Line 14: warning: exported type ApiCommitsResponse should have comment or be unexported (golint)
    • Line 15: warning: exported type CommitsResponse should have comment or be unexported (golint)
    • Line 21: warning: exported type Commit should have comment or be unexported (golint)
    • Line 35: warning: exported function CollectCommits should have comment or be unexported (golint)
    • lake/plugins/github/github.go
    • Line 8: warning: exported type Github should have comment or be unexported (golint)
    • Line 10: warning: exported method Github.Description should have comment or be unexported (golint)
    • Line 14: warning: exported method Github.Execute should have comment or be unexported (golint)
    • Line 62: warning: comment on exported var PluginEntry should be of the form "PluginEntry ..." (golint)
    • lake/plugins/jenkins/jenkins.go
    • Line 12: warning: exported type JenkinsOptions should have comment or be unexported (golint)
    • Line 18: warning: exported type Jenkins should have comment or be unexported (golint)
    • Line 20: warning: exported method Jenkins.Init should have comment or be unexported (golint)
    • Line 27: warning: exported method Jenkins.Description should have comment or be unexported (golint)
    • Line 31: warning: exported method Jenkins.CleanData should have comment or be unexported (golint)
    • Line 42: warning: exported method Jenkins.Execute should have comment or be unexported (golint)
    • Line 59: warning: exported var PluginEntry should have comment or be unexported (golint)
    • lake/logger/log.go
    • Line 21: warning: exported var Black should have comment or be unexported (golint)
    • Line 31: warning: exported function Color should have comment or be unexported (golint)
    • Line 42: warning: exported function Log should have comment or be unexported (golint)
    • Line 50: warning: exported function Print should have comment or be unexported (golint)
    • Line 54: warning: exported function Debug should have comment or be unexported (golint)
    • Line 58: warning: exported function Info should have comment or be unexported (golint)
    • Line 62: warning: exported function Error should have comment or be unexported (golint)
    • Line 66: warning: exported function Warn should have comment or be unexported (golint)
    • lake/services/task.go
    • Line 14: warning: exported const TASK_CREATED should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type NewTask should have comment or be unexported (golint)
    • Line 30: warning: exported function CreateTask should have comment or be unexported (golint)
    • Line 79: warning: exported function GetTasks should have comment or be unexported (golint)
    • lake/plugins/gitlab/tasks/gitlab_pipelinie_collector.go
    • Line 15: warning: exported type ApiPipelineResponse should have comment or be unexported (golint)
    • Line 25: warning: exported type ApiSinglePipelineResponse should have comment or be unexported (golint)
    • Line 39: warning: exported function CollectAllPipelines should have comment or be unexported (golint)
    • Line 77: warning: exported function CollectChildrenOnPipelines should have comment or be unexported (golint)
    • lake/plugins/jira/tasks/jiraissuecollector.go
    • Line 22: warning: exported type JiraApiIssue should have comment or be unexported (golint)
    • Line 29: warning: exported type JiraApiIssuesResponse should have comment or be unexported (golint)
    • Line 39: warning: exported function CollectIssues should have comment or be unexported (golint)
    • lake/plugins/gitlab/tasks/gitlab_merge_request_note.go
    • Line 15: warning: exported type MergeRequestNote should have comment or be unexported (golint)
    • Line 29: warning: exported type ApiMergeRequestNoteResponse should have comment or be unexported (golint)
    • Line 31: warning: exported function FindEarliestNote should have comment or be unexported (golint)
    • Line 72: warning: exported function CollectMergeRequestNotes should have comment or be unexported (golint)
    • lake/plugins/core/iso8601time.go
    • Line 9: warning: comment on exported type Iso8601Time should be of the form "Iso8601Time ..." (with optional leading article) (golint)
    • Line 25: warning: exported const ISO_8601_FORMAT should have comment or be unexported (golint)
    • Line 32: warning: exported method Iso8601Time.MarshalJSON should have comment or be unexported (golint)
    • Line 36: warning: exported method Iso8601Time.UnmarshalJSON should have comment or be unexported (golint)
    • Line 46: warning: exported method Iso8601Time.ToTime should have comment or be unexported (golint)
    • lake/plugins/jenkins/tasks/storage.go
    • Line 12: warning: exported type DefaultJenkinsStorage should have comment or be unexported (golint)
    • Line 16: warning: exported function NewDeafultJenkinsStorage should have comment or be unexported (golint)
    • Line 29: warning: exported method DefaultJenkinsStorage.SaveJob should have comment or be unexported (golint)
    • Line 41: warning: exported method DefaultJenkinsStorage.SaveJobs should have comment or be unexported (golint)
    • Line 57: warning: exported method DefaultJenkinsStorage.SaveBuild should have comment or be unexported (golint)
    • Line 77: warning: exported method DefaultJenkinsStorage.SaveBuilds should have comment or be unexported (golint)
    • lake/plugins/github/tasks/github_api_client.go
    • Line 17: warning: exported type GithubApiClient should have comment or be unexported (golint)
    • Line 23: warning: exported function CreateApiClient should have comment or be unexported (golint)
    • Line 39: warning: exported type GithubPaginationHandler should have comment or be unexported (golint)
    • Line 51: warning: don't use underscores in Go names; var page_size should be pageSize (golint)
    • Line 84: warning: comment on exported method GithubApiClient.FetchWithPaginationAnts should be of the form "FetchWithPaginationAnts ..." (golint)
    • Line 187: warning: comment on exported method GithubApiClient.FetchWithPagination should be of the form "FetchWithPagination ..." (golint)
    • lake/plugins/gitlab/gitlab.go
    • Line 11: warning: exported type Gitlab should have comment or be unexported (golint)
    • Line 13: warning: exported method Gitlab.Description should have comment or be unexported (golint)
    • Line 17: warning: exported method Gitlab.Execute should have comment or be unexported (golint)
    • Line 136: warning: comment on exported var PluginEntry should be of the form "PluginEntry ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign0%

IneffAssign detects ineffectual assignments in Go code.

An error occurred while running this test (signal: killed)


misspell95%

Misspell Finds commonly misspelled English words