Skip to content

Commit

Permalink
Fix the int conversion warning in linter (#3968)
Browse files Browse the repository at this point in the history
* nolint on the intended use of int64 to int conversion

* Upgrade golint version

* reenable onlint
  • Loading branch information
KyleJu authored Aug 26, 2024
1 parent 6841e14 commit 15e7481
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ GO_FILES := $(shell find $(WPTD_PATH) -type f -name '*.go')
GO_TEST_FILES := $(shell find $(WPTD_PATH) -type f -name '*_test.go')
# Golangci version should be updated periodically.
# See: https://golangci-lint.run/usage/install/#other-ci
GOLANGCI_LINT_VERSION := v1.52.2
GOLANGCI_LINT_VERSION := v1.60.3

build: go_build

Expand Down
1 change: 1 addition & 0 deletions api/query/cache/backfill/backfill.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ func FillIndex(

func startBackfillMonitor(store shared.Datastore, logger shared.Logger, maxBytes uint64, m *backfillMonitor) error {
// FetchRuns will return at most N runs for each product, so divide the upper bound by the number of products.
//nolint:gosec
limit := int(maxBytes/bytesPerRun) / len(shared.GetDefaultProducts())
runsByProduct, err := store.TestRunQuery().LoadTestRuns(shared.GetDefaultProducts(), nil, nil, nil, nil, &limit, nil)
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions api/query/cache/index/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ func (i *shardedWPTIndex) IngestRun(r shared.TestRun) error {
return err
}

//nolint:gosec
shardIdx := int(t.testID % numShardsU64)
dataForShard := shardData[shardIdx]
re := ResultID(shared.TestStatusValueFromString(res.Status))
Expand Down

0 comments on commit 15e7481

Please sign in to comment.