mirror of
https://github.com/gonum/gonum.git
synced 2025-10-21 14:19:35 +08:00
all: clean up lint identified by ruleguard
Ruleguard run with ruleguard -c=0 -rules ruleguard.rules.go ./... from https://github.com/dgryski/semgrep-go with the following rules inactivated to reduce noise: - unconvert for floating point values - oddcomparisons - floateq
This commit is contained in:
@@ -20,7 +20,7 @@ func TestLength(t *testing.T) {
|
||||
t.Errorf("unexpected error for %T conversion: %v", got, err)
|
||||
}
|
||||
if got != Length(value) {
|
||||
t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, float64(value), got, value)
|
||||
t.Errorf("unexpected result from round trip of %T(%v): got: %v want: %v", got, value, got, value)
|
||||
}
|
||||
if got != got.Length() {
|
||||
t.Errorf("unexpected result from self interface method call: got: %#v want: %#v", got, value)
|
||||
@@ -49,7 +49,7 @@ func TestLengthFormat(t *testing.T) {
|
||||
} {
|
||||
got := fmt.Sprintf(test.format, test.value)
|
||||
if got != test.want {
|
||||
t.Errorf("Format %q %v: got: %q want: %q", test.format, float64(test.value), got, test.want)
|
||||
t.Errorf("Format %q %v: got: %q want: %q", test.format, test.value, got, test.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user