Skip to content

all: Address golang-ci run warnings

Administrator requested to merge tsenart/golang-ci-run into master

Created by: tsenart

cmd/frontend/internal/app/pkg/updatecheck/client.go:107:6: `getTotalUsersCount` is unused (deadcode)
func getTotalUsersCount(ctx context.Context) (int, error) {
     ^
cmd/frontend/internal/app/pkg/updatecheck/client.go:125:6: `getInitialSiteAdminEmail` is unused (deadcode)
func getInitialSiteAdminEmail(ctx context.Context) (string, error) {
     ^
internal/cmd/search-integration-tester/search_tests.go:157:14: Error return value of `os.MkdirAll` is not checked (errcheck)
                os.MkdirAll(searchTestDataDir, os.ModePerm)
                           ^
cmd/frontend/db/external_services.go:191:19: Error return value of `multierror.Append` is not checked (errcheck)
        multierror.Append(err, e.validateDuplicateRateLimits(ctx, id, "GITHUB", c))
                         ^
cmd/frontend/db/external_services.go:202:19: Error return value of `multierror.Append` is not checked (errcheck)
        multierror.Append(err, e.validateDuplicateRateLimits(ctx, id, "GITLAB", c))
                         ^
cmd/frontend/db/external_services.go:217:19: Error return value of `multierror.Append` is not checked (errcheck)
        multierror.Append(err, e.validateDuplicateRateLimits(ctx, id, "BITBUCKETSERVER", c))
                         ^
cmd/frontend/internal/app/pkg/updatecheck/client.go:87:11: Error return value of `rec` is not checked (errcheck)
        defer rec(err)
                 ^
cmd/frontend/internal/app/pkg/updatecheck/client.go:134:11: Error return value of `rec` is not checked (errcheck)
        defer rec(err)
                 ^
cmd/frontend/internal/app/pkg/updatecheck/client.go:144:11: Error return value of `rec` is not checked (errcheck)
        defer rec(err)
                 ^
cmd/frontend/graphqlbackend/search_results_test.go:264:13: ineffectual assignment to `err` (ineffassign)
                        results, err := r.Results(context.Background())
                                 ^
cmd/frontend/graphqlbackend/search_alert.go:49:19: S1039: unnecessary use of fmt.Sprintf (gosimple)
                description:    fmt.Sprintf("One and-expression in the query requires a lot of work! Try using the 'repo:' or 'file:' filters to narrow your search. We're working on improving this experience in https://github.com/sourcegraph/sourcegraph/issues/9824"),
                                ^
enterprise/internal/campaigns/store_test.go:1314:20: S1039: unnecessary use of fmt.Sprintf (gosimple)
                        Name:           fmt.Sprintf("ListChangesetSyncData test"),
                                        ^
cmd/frontend/graphqlbackend/search.go:769:59: S1002: should omit comparison to bool constant, can be simplified to `!matched` (gosimple)
                        if matched := patterns.MatchString(string(repo.Name)); false == matched {
                                                                               ^

Merge request reports

Loading