Skip to content

Commit

Permalink
lint; up cli
Browse files Browse the repository at this point in the history
* golangci 1.60.2 (was 1.60.1); linters:
  - exportloopref (deprecated)
  + copyloopvar

Signed-off-by: Alex Aizman <[email protected]>
  • Loading branch information
alex-aizman committed Aug 21, 2024
1 parent c434fb6 commit 3500e92
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 13 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.1
version: v1.60.2
args: --timeout=30m

- name: Lint
Expand Down
5 changes: 3 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ linters:
- asciicheck
- bodyclose
- canonicalheader
- copyloopvar
- depguard
- dogsled
- dupl
- durationcheck
- errcheck
- exportloopref
- fatcontext
- gci
- gochecksumtype
Expand Down Expand Up @@ -97,7 +97,8 @@ linters-settings:
- ifElseChain
- unnamedResult
gosec:
excludes:
excludes: ## TODO: revisit
- G115
- G401
- G402
- G404
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.1
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH)/bin v1.60.2

lint:
@([[ -x "$(command -v golangci-lint)" ]] && echo "Cannot find golangci-lint, run 'make lint-update' to install" && exit 1) || true
Expand Down
6 changes: 0 additions & 6 deletions ais/test/dsort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ func runDsortTest(t *testing.T, dts dsortTestSpec, f any) {
}

for _, dsorterType := range dts.types {
dsorterType := dsorterType // pin
t.Run(dsorterType, func(t *testing.T) {
if dts.p {
t.Parallel()
Expand All @@ -149,7 +148,6 @@ func runDsortTest(t *testing.T, dts dsortTestSpec, f any) {
} else if len(dts.phases) > 0 {
g := f.(func(dsorterType, phase string, t *testing.T))
for _, phase := range dts.phases {
phase := phase // pin
t.Run(phase, func(t *testing.T) {
if dts.p {
t.Parallel()
Expand All @@ -159,15 +157,13 @@ func runDsortTest(t *testing.T, dts dsortTestSpec, f any) {
}
} else if len(dts.reactions) > 0 {
for _, reaction := range dts.reactions {
reaction := reaction // pin
t.Run(reaction, func(t *testing.T) {
if dts.p {
t.Parallel()
}

if len(dts.scopes) > 0 {
for _, scope := range dts.scopes {
scope := scope // pin
t.Run(scope, func(t *testing.T) {
if dts.p {
t.Parallel()
Expand All @@ -186,7 +182,6 @@ func runDsortTest(t *testing.T, dts dsortTestSpec, f any) {
} else if len(dts.algs) > 0 {
g := f.(func(dsorterType, alg string, t *testing.T))
for _, alg := range dts.algs {
alg := alg // pin
t.Run(alg, func(t *testing.T) {
if dts.p {
t.Parallel()
Expand Down Expand Up @@ -1286,7 +1281,6 @@ func TestDsortContent(t *testing.T) {
}

for _, entry := range cases {
entry := entry // pin
test := fmt.Sprintf("%s-%v", entry.contentKeyType, entry.missingKeys)
t.Run(test, func(t *testing.T) {
t.Parallel()
Expand Down
2 changes: 1 addition & 1 deletion cmd/cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/NVIDIA/aistore/cmd/cli
go 1.22.3

require (
github.com/NVIDIA/aistore v1.3.24-0.20240821221104-68b007550bc5
github.com/NVIDIA/aistore v1.3.24-0.20240821225139-c434fb653803
github.com/fatih/color v1.17.0
github.com/json-iterator/go v1.1.12
github.com/onsi/ginkgo/v2 v2.20.0
Expand Down
4 changes: 2 additions & 2 deletions cmd/cli/go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/NVIDIA/aistore v1.3.24-0.20240821221104-68b007550bc5 h1:LSxBjMuIUVue0RGbWNUUtDAa9tEFI/VlqACNeRkrVjI=
github.com/NVIDIA/aistore v1.3.24-0.20240821221104-68b007550bc5/go.mod h1:si83S9r29vwIC0f0CE2Mk+25bFiaN6mmVlmuBpP4hHM=
github.com/NVIDIA/aistore v1.3.24-0.20240821225139-c434fb653803 h1:eRCEK36yW0HZSLD5ZEV7G/m/dSv+POq9YB4byuZXo5Y=
github.com/NVIDIA/aistore v1.3.24-0.20240821225139-c434fb653803/go.mod h1:si83S9r29vwIC0f0CE2Mk+25bFiaN6mmVlmuBpP4hHM=
github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8=
github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q=
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
Expand Down

0 comments on commit 3500e92

Please sign in to comment.