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: expected-actual #14229

Merged
merged 1 commit into from
Nov 1, 2023
Merged

chore(linters): Fix findings found by testifylint: expected-actual #14229

merged 1 commit into from
Nov 1, 2023

Conversation

zak-pawel
Copy link
Collaborator

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

❌   assert.Equal(t, result, 42)
     assert.NotEqual(t, result, "expected")
     assert.JSONEq(t, result, `{"version": 3}`)
     assert.YAMLEq(t, result, "version: '3'")

✅   assert.Equal(t, 42, result)
     assert.NotEqual(t, "expected", result)
     assert.JSONEq(t, `{"version": 3}`, result)
     assert.YAMLEq(t, "version: '3'", result)

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 telegraf-tiger bot added the chore label Oct 31, 2023
@zak-pawel zak-pawel requested review from powersj and srebhan and removed request for powersj October 31, 2023 22:39
@telegraf-tiger
Copy link
Contributor

Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

Thanks for going through those cases @zak-pawel!

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Nov 1, 2023
@powersj powersj merged commit 8fbea28 into influxdata:master Nov 1, 2023
4 checks passed
@github-actions github-actions bot added this to the v1.28.4 milestone Nov 1, 2023
Hipska added a commit to Super-Visions/telegraf that referenced this pull request Nov 2, 2023
…nmp_lookup

* upstream/master:
  chore(linters): Fix findings found by testifylint: expected-actual (influxdata#14229)
  chore(deps): Bump github.com/nats-io/nkeys from 0.4.5 to 0.4.6 (influxdata#14225)
  feat(inputs.procstat)!: Remove useless zero cpu_times (influxdata#14224)
  feat(inputs.gnmi): Rework plugin (influxdata#14091)
  fix(outputs.timestream): Clip uint64 values (influxdata#14213)
  fix(inputs.cgroup): Escape backslashes (influxdata#14187)
  test(outputs.kafka): Use private network for testing (influxdata#14220)
  test(inputs.vault): Fix integration test by only testing for subset (influxdata#14222)
  fix(outputs.elasticsearch): Print error status value (influxdata#14115)
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
Labels
chore linter ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants