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:
Dan Kortschak
2021-05-18 20:22:10 +09:30
parent a4975614d9
commit 03398562de
40 changed files with 82 additions and 82 deletions

View File

@@ -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)
}
}
}