Skip to content

Commit 632f111

Browse files
committed
fix: golangci-lint check
1 parent 4e157a4 commit 632f111

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func ExampleNew() {
1919

2020
w, h := 100, 100
2121

22-
heightmap := make([]float64, int(w*h))
22+
heightmap := make([]float64, w*h)
2323

2424
for y := 0; y < h; y++ {
2525
for x := 0; x < w; x++ {

noise_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ func TestNew_unknown_noise_type(t *testing.T) {
1818
require.Nil(t, g, "it should be nil on error")
1919
}
2020

21+
//nolint:dupl // let lines be duplicate with other tests for readability
2122
func TestNew_is_in_range_perlin(t *testing.T) {
2223
for i := 0; i < 100; i++ {
24+
//nolint:gosec // Use of weak random number generator is OK here
2325
seed := rand.New(rand.NewSource(time.Now().UnixNano())).Int63()
2426

2527
g, err := noise.New(noise.Perlin, seed)
@@ -34,8 +36,10 @@ func TestNew_is_in_range_perlin(t *testing.T) {
3436
}
3537
}
3638

39+
//nolint:dupl // let lines be duplicate with other tests for readability
3740
func TestNew_is_in_range_opensimplex(t *testing.T) {
3841
for i := 0; i < 100; i++ {
42+
//nolint:gosec // Use of weak random number generator is OK here
3943
seed := rand.New(rand.NewSource(time.Now().UnixNano())).Int63()
4044

4145
g, err := noise.New(noise.OpenSimplex, seed)

0 commit comments

Comments
 (0)