Skip to content

Commit

Permalink
[chore]: enable formatter rule from testifylint (#6156)
Browse files Browse the repository at this point in the history
Testifylint is a linter that provides best practices with the use of
testify.

This PR enables
[formatter](https://github.com/Antonboom/testifylint?tab=readme-ov-file#formatter)
rule from [testifylint](https://github.com/Antonboom/testifylint)

Signed-off-by: Matthieu MOREL <[email protected]>
  • Loading branch information
mmorel-35 authored Sep 30, 2024
1 parent f074513 commit bace98b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,5 +260,4 @@ linters-settings:
enable-all: true
disable:
- float-compare
- formatter
- require-error
3 changes: 1 addition & 2 deletions instrumentation/runtime/runtime_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package runtime // import "go.opentelemetry.io/contrib/instrumentation/runtime"

import (
"context"
"fmt"
"math"
"runtime/debug"
"testing"
Expand Down Expand Up @@ -182,7 +181,7 @@ func assertNonZeroValues(t *testing.T, sm metricdata.ScopeMetrics) {
switch a := m.Data.(type) {
case metricdata.Sum[int64]:
for _, dp := range a.DataPoints {
assert.Positive(t, dp.Value, fmt.Sprintf("Metric %q should have a non-zero value for point with attributes %+v", m.Name, dp.Attributes))
assert.Positivef(t, dp.Value, "Metric %q should have a non-zero value for point with attributes %+v", m.Name, dp.Attributes)
}
default:
t.Fatalf("unexpected data type %v", a)
Expand Down

0 comments on commit bace98b

Please sign in to comment.