diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8ab5a74..e634fae 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,10 +15,9 @@ jobs: go-version-file: 'go.mod' - name: golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v6 with: version: latest - args: --config .golangci.yml - name: Run tests run: make test-cov diff --git a/.golangci.yml b/.golangci.yml index 74042a2..8f639aa 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,8 +1,6 @@ run: timeout: 5m tests: true - skip-dirs: - - pkg/apps/.* linters: enable: @@ -13,7 +11,6 @@ linters: - errname - errorlint - exhaustive - - exportloopref - gocritic - gofmt - goimports diff --git a/pkg/pubsub/pubsub_test.go b/pkg/pubsub/pubsub_test.go index f2726bf..c4c5a99 100644 --- a/pkg/pubsub/pubsub_test.go +++ b/pkg/pubsub/pubsub_test.go @@ -113,7 +113,7 @@ func TestPubSub_slowpoke(t *testing.T) { wgSlow.Wait() }() - slowSub := p.Subscribe(func(msg string) error { + slowSub := p.Subscribe(func(string) error { defer wgSlow.Done() select { @@ -153,7 +153,7 @@ func TestPubSub_slowpoke(t *testing.T) { func TestPubSub_unsubscribe(t *testing.T) { p := NewPubSub[string]() - sub1 := p.Subscribe(func(msg string) error { + sub1 := p.Subscribe(func(string) error { t.Error("first subscriber must not be called") return nil }) diff --git a/pkg/testutils/testutils.go b/pkg/testutils/testutils.go index c5b25f4..d764db1 100644 --- a/pkg/testutils/testutils.go +++ b/pkg/testutils/testutils.go @@ -46,9 +46,8 @@ func RandomString(length int) string { return RandomStringWithCharset(length, charset) } -func RandomInt(min, max int) int { - n := seededRand.Intn(max - min) - return min + n +func RandomInt(mn, mx int) int { + return mn + seededRand.Intn(mx-mn) } func RandomIP() string { diff --git a/proto/buf.yaml b/proto/buf.yaml index 310c5fd..2119a15 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -4,7 +4,7 @@ breaking: - WIRE_JSON lint: use: - - DEFAULT + - STANDARD except: - PACKAGE_VERSION_SUFFIX - RPC_REQUEST_STANDARD_NAME