Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
nikandfor committed Feb 10, 2025
1 parent 74522a5 commit 9ed5b8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ linters-settings:
goconst:
min-len: 2
min-occurrences: 3
gosec:
excludes:
- G115
revive:
rules:
- name: unused-parameter
Expand Down
12 changes: 6 additions & 6 deletions eazy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1084,8 +1084,8 @@ func testOnFile(t *testing.T, ver int) {
assert.NoError(t, err)
assert.Equal(t, int(n), dec.Len())

min := dec.Len()
assert.Equal(t, testData[:min], dec.Bytes())
decLen := dec.Len()
assert.Equal(t, testData[:decLen], dec.Bytes())

// t.Logf("metrics: %v bytes %v events %v", mm, dec.Len(), testsCount)
t.Logf("compression ratio %v", float32(dec.Len())/float32(enc.Len()))
Expand Down Expand Up @@ -1241,12 +1241,12 @@ func BenchmarkDecompressFile(b *testing.B) {

b.SetBytes(int64(decoded.Len() / testsCount))

min := len(testData)
if min > decoded.Len() {
min = decoded.Len()
decLen := len(testData)
if decLen > decoded.Len() {
decLen = decoded.Len()
}

assert.Equal(b, testData[:min], decoded.Bytes())
assert.Equal(b, testData[:decLen], decoded.Bytes())
}

func loadTestFile(tb testing.TB, f string) (err error) {
Expand Down

0 comments on commit 9ed5b8f

Please sign in to comment.