diff --git a/.golangci.yml b/.golangci.yml index 7b04160..e9ef82f 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -17,25 +17,26 @@ linters-settings: min-len: 2 min-occurrences: 3 depguard: - list-type: whitelist - packages: - - github.com/beorn7/perks/quantile - - github.com/getsentry/sentry-go - - github.com/gin-gonic/gin - - github.com/nikandfor/cli - - github.com/nikandfor/errors - - github.com/nikandfor/goid - - github.com/nikandfor/loc - - github.com/nikandfor/quantile - - github.com/nikandfor/tlog - - github.com/opentracing/opentracing-go - - github.com/prometheus/client_golang - - github.com/prometheus/client_model - - github.com/stretchr/testify/assert - - github.com/stretchr/testify/require - - go.opentelemetry.io/otel - - golang.org/x - - gopkg.in/fsnotify.v1 + rules: + main: + allow: + - $gostd + - github.com/beorn7/perks/quantile + - github.com/getsentry/sentry-go + - github.com/gin-gonic/gin + - github.com/nikandfor/cli + - github.com/nikandfor/errors + - github.com/nikandfor/goid + - github.com/nikandfor/loc + - github.com/nikandfor/quantile + - github.com/nikandfor/tlog + - github.com/opentracing/opentracing-go + - github.com/prometheus/client_golang + - github.com/prometheus/client_model + - github.com/stretchr/testify + - go.opentelemetry.io/otel + - golang.org/x + - gopkg.in/fsnotify.v1 misspell: lll: line-length: 170 diff --git a/location_stack_test.go b/location_stack_test.go index 911382e..7e94102 100644 --- a/location_stack_test.go +++ b/location_stack_test.go @@ -118,7 +118,7 @@ func innerFuncName(fn PC, n int) string { s += "." } - s += fmt.Sprintf("%v", 1) + s += "1" } } diff --git a/location_test.go b/location_test.go index 9c62076..1469296 100644 --- a/location_test.go +++ b/location_test.go @@ -82,7 +82,8 @@ func TestCaller(t *testing.T) { a, b := Caller(0), Caller(0) - assert.False(t, a == b, "%x == %x", uintptr(a), uintptr(b)) + // assert.False(t, a == b, "%x == %x", uintptr(a), uintptr(b)) + assert.NotEqual(t, a, b) } func TestSetCache(t *testing.T) {