From 275b6aa6427b8bc3b7d0eb62a6b2b13cf0f87837 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Pa=C3=9F?= <22845248+mpass99@users.noreply.github.com> Date: Wed, 29 Jun 2022 15:23:17 +0200 Subject: [PATCH] #89 Adjust golangci-lint configuration as it does not support generics at this moment. See https://github.com/golangci/golangci-lint/issues/2649 --- .golangci.yaml | 4 ++++ pkg/storage/storage.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.golangci.yaml b/.golangci.yaml index 0d487af..a2b92c6 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -18,6 +18,10 @@ linters-settings: - style disabled-checks: - dupImport # https://github.com/go-critic/go-critic/issues/845 + - hugeParam # No golang generic support. See https://github.com/golangci/golangci-lint/issues/2649 + - rangeValCopy # ^ + - typeDefFirst # | + - paramTypeCombine # | gocyclo: min-complexity: 15 gomnd: diff --git a/pkg/storage/storage.go b/pkg/storage/storage.go index 7c79122..bb4e0b7 100644 --- a/pkg/storage/storage.go +++ b/pkg/storage/storage.go @@ -97,7 +97,7 @@ func (s *localStorage[T]) Sample() (o T, ok bool) { delete(s.objects, key) return object, true } - return + return o, false } func (s *localStorage[T]) Length() uint {