Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
* golangci 1.61.0 (was 1.60.2)

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Sep 10, 2024
1 parent 0642c85 commit 2e9edee
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# NOTE: See `lint-update-ci` target in Makefile.
version: v1.60.2
version: v1.61.0
args: --timeout=30m

- name: Lint
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ lint-update:
## See also: .github/workflows/lint.yml
lint-update-ci:
@rm -f $(GOPATH)/bin/golangci-lint
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.60.2
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.61.0

lint:
@([[ -x "$(command -v golangci-lint)" ]] && echo "Cannot find golangci-lint, run 'make lint-update' to install" && exit 1) || true
Expand Down
2 changes: 1 addition & 1 deletion ais/test/etl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func tfRecordsEqual(examples1, examples2 []*core.TFExample) (bool, error) {
return examples2[i].GetFeature("__key__").String() < examples2[j].GetFeature("__key__").String()
})

for i := range len(examples1) {
for i := range examples1 {
if !reflect.DeepEqual(examples1[i].ProtoReflect(), examples2[i].ProtoReflect()) {
return false, nil
}
Expand Down
2 changes: 1 addition & 1 deletion ais/test/object_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ func verifyValidRanges(t *testing.T, proxyURL string, bck cmn.Bck, cksumType, ob
t.Errorf("Returned bytes don't match expected length. Expected length: [%d]. Output length: [%d]",
expectedLength, len(outputBytes))
}
for i := range len(expectedBytes) {
for i := range expectedBytes {
if expectedBytes[i] != outputBytes[i] {
t.Errorf("Byte mismatch. Expected: %v, Actual: %v", string(expectedBytes), string(outputBytes))
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/cli/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func findClosestCommand(cmd string, candidates []cli.Command) (result string, di
minDist = math.MaxInt64
closestName string
)
for i := range len(candidates) {
for i := range candidates {
dist := DamerauLevenstheinDistance(cmd, candidates[i].Name)
if dist < minDist {
minDist = dist
Expand Down Expand Up @@ -839,7 +839,7 @@ func _printSection(c *cli.Context, in any, section string) (done bool) {
// resort to counting nested structures
var cnt, off int
res = out[from[0]:]
for off = range len(res) {
for off = range res {
if res[off] == '{' {
cnt++
} else if res[off] == '}' {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/teb/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func _flt(cols []*header, regex *regexp.Regexp) []*header {
}

func _idx(cols []*header, name string) int {
for i := range len(cols) {
for i := range cols {
if cols[i].name == name {
return i
}
Expand Down
2 changes: 1 addition & 1 deletion core/namelocker.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const (

func newNameLocker() (nl nameLocker) {
nl = make(nameLocker, cos.MultiSyncMapCount)
for idx := range len(nl) {
for idx := range nl {
nl[idx].init()
}
return
Expand Down
2 changes: 1 addition & 1 deletion hk/housekeeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var _ = Describe("Housekeeper", func() {

time.Sleep(20 * time.Millisecond)
// "foo" and "bar" should fire at the start (no initial interval)
for idx := range len(fired) {
for idx := range fired {
Expect(fired[idx]).To(BeTrue())
fired[idx] = false
}
Expand Down
2 changes: 1 addition & 1 deletion transport/obj_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func TestSendCallback(t *testing.T) {
posted = make([]*randReader, objectCnt)
)
random := newRand(mono.NanoTime())
for idx := range len(posted) {
for idx := range posted {
hdr, rr := makeRandReader(random, false)
mu.Lock()
posted[idx] = rr
Expand Down

0 comments on commit 2e9edee

Please sign in to comment.