reviewdog [golangci] report
reported by reviewdog 🐶
Findings (4)
internal/scm/github/graphql.go|128 col 80| var-naming: method parameter repositoryId should be repositoryID (revive)
internal/scm/github/graphql.go|278 col 3| var-naming: struct field RepositoryId should be RepositoryID (revive)
internal/scm/github/graphql.go|290 col 4| var-naming: struct field DatabaseId should be DatabaseID (revive)
internal/scm/github/graphql.go|105 col 1| error-return: error should be the last type when returning multiple items (revive)
Filtered Findings (21)
internal/scm/gitlab/gitlab.go|272 col 18| var-naming: method getUserIds should be getUserIDs (revive)
internal/multigitter/run.go|230 col 1| cyclomatic complexity 30 of func (*Runner).runSingleRepo
is high (> 25) (gocyclo)
cmd/cmd-run.go|81 col 1| cyclomatic complexity 33 of func run
is high (> 25) (gocyclo)
internal/scm/github/retry_test.go|112 col 17| unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
internal/scm/github/retry_test.go|135 col 15| unused-parameter: parameter 'ctx' seems to be unused, consider removing or renaming it as _ (revive)
cmd/cmd-root.go|15 col 47| unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
cmd/logging.go|19 col 55| unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
cmd/logging.go|24 col 56| unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
cmd/platform.go|40 col 54| unused-parameter: parameter 'cmd' seems to be unused, consider removing or renaming it as _ (revive)
tests/table_test.go|229 col 65| unused-parameter: parameter 'runData' seems to be unused, consider removing or renaming it as _ (revive)
tests/table_test.go|261 col 65| unused-parameter: parameter 'runData' seems to be unused, consider removing or renaming it as _ (revive)
tests/table_test.go|292 col 65| unused-parameter: parameter 'runData' seems to be unused, consider removing or renaming it as _ (revive)
tests/table_test.go|638 col 19| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
tests/table_test.go|645 col 31| unused-parameter: parameter 'vcMock' seems to be unused, consider removing or renaming it as _ (revive)
tests/table_test.go|652 col 19| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
tests/table_test.go|659 col 31| unused-parameter: parameter 'vcMock' seems to be unused, consider removing or renaming it as _ (revive)
tests/table_test.go|666 col 19| unused-parameter: parameter 't' seems to be unused, consider removing or renaming it as _ (revive)
tests/table_test.go|673 col 31| unused-parameter: parameter 'vcMock' seems to be unused, consider removing or renaming it as _ (revive)
cmd/cmd-root.go|31 col 2| SA1019: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (staticcheck)
internal/scm/github/github.go|48 col 17| SA1019: github.NewEnterpriseClient is deprecated: Use NewClient(httpClient).WithEnterpriseURLs(baseURL, uploadURL) instead. (staticcheck)
internal/scm/github/github.go|285 col 11| SA1019: g.ghClient.Repositories.List is deprecated: Use RepositoriesService.ListByUser or RepositoriesService.ListByAuthenticatedUser instead. (staticcheck)
Annotations
Check failure on line 128 in internal/scm/github/graphql.go
github-actions / golangci
[golangci] internal/scm/github/graphql.go#L128
var-naming: method parameter repositoryId should be repositoryID (revive)
Raw output
internal/scm/github/graphql.go:128:80: var-naming: method parameter repositoryId should be repositoryID (revive)
func (g *Github) createRef(ctx context.Context, branchName string, oid string, repositoryId string) error {
^
Check failure on line 278 in internal/scm/github/graphql.go
github-actions / golangci
[golangci] internal/scm/github/graphql.go#L278
var-naming: struct field RepositoryId should be RepositoryID (revive)
Raw output
internal/scm/github/graphql.go:278:3: var-naming: struct field RepositoryId should be RepositoryID (revive)
RepositoryId string `json:"repositoryId"`
^
Check failure on line 290 in internal/scm/github/graphql.go
github-actions / golangci
[golangci] internal/scm/github/graphql.go#L290
var-naming: struct field DatabaseId should be DatabaseID (revive)
Raw output
internal/scm/github/graphql.go:290:4: var-naming: struct field DatabaseId should be DatabaseID (revive)
DatabaseId string `json:"databaseId"`
^
Check failure on line 105 in internal/scm/github/graphql.go
github-actions / golangci
[golangci] internal/scm/github/graphql.go#L105
error-return: error should be the last type when returning multiple items (revive)
Raw output
internal/scm/github/graphql.go:105:1: error-return: error should be the last type when returning multiple items (revive)
func (g *Github) getRepositoryID(ctx context.Context, owner string, name string) (error, string) {
query := `query($owner: String!, $name: String!) {
repository(owner: $owner, name: $name) {
databaseId
}
}`
var v getRepositoryInput
v.Name = name
v.Owner = owner
var result getRepositoryOutput
err := g.makeGraphQLRequest(ctx, query, v, &result)
if err != nil {
return err, ""
}
return nil, result.Data.Repository.DatabaseId
}