Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(linters): Fix findings found by testifylint: compares #14177

Merged
merged 2 commits into from
Oct 24, 2023
Merged

chore(linters): Fix findings found by testifylint: compares #14177

merged 2 commits into from
Oct 24, 2023

Conversation

zak-pawel
Copy link
Collaborator

Address findings for testifylint: compares - checks usage of github.com/stretchr/testify.

❌   assert.True(t, a == b)
     assert.True(t, a != b)
     assert.True(t, a > b)
     assert.True(t, a >= b)
     assert.True(t, a < b)
     assert.True(t, a <= b)
     // And other variations (with assert.False too)...

✅   assert.Equal(t, a, b)
     assert.NotEqual(t, a, b)
     assert.Greater(t, a, b)
     assert.GreaterOrEqual(t, a, b)
     assert.Less(t, a, b)
     assert.LessOrEqual(t, a, b)

It is only part of the bigger job.
After all type of findings in whole project are handled, we can enable testifylint linter in golangci-lint.

@telegraf-tiger
Copy link
Contributor

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@powersj powersj merged commit 7c5b3ea into influxdata:master Oct 24, 2023
4 checks passed
@github-actions github-actions bot added this to the v1.28.4 milestone Oct 24, 2023
powersj pushed a commit that referenced this pull request Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants