Skip to content

Conversation

rolinh
Copy link
Member

@rolinh rolinh commented Nov 21, 2024

The testifylint linter trips over some assertion that contain JSON data and suggtests using assert.JSONEq instead of the more generic assert.Equal. This is great in most cases as JSONEq also verifies that the JSON is valid. However, it doesn't work with newline delimted JSON. For this reason, let's selectively ignore the testify warning where this condition applies.
Note that the patch also moves around some nolint instructions as they were weirdly not followed by the linter.

Ref: #35960, #35956

@rolinh rolinh added release-note/ci This PR makes changes to the CI. sig/hubble labels Nov 21, 2024
@rolinh rolinh requested a review from a team as a code owner November 21, 2024 13:30
@rolinh rolinh requested a review from kaworu November 21, 2024 13:30
@aanm aanm enabled auto-merge November 21, 2024 13:54
@aanm
Copy link
Member

aanm commented Nov 21, 2024

/test

The testifylint linter trips over some assertion that contain JSON data
and suggtests using assert.JSONEq instead of the more generic
assert.Equal. This is great in most cases as JSONEq also verifies that
the JSON is valid. However, it doesn't work with newline delimted JSON.
For this reason, let's selectively ignore the testify warning where this
condition applies.
Note that the patch also moves around some nolint instructions as they
were weirdly not followed by the linter.

Signed-off-by: Robin Hahling <robin.hahling@gw-computing.net>
@aanm aanm force-pushed the pr/rolinh/testifylint branch from 3d8b7f9 to c347810 Compare November 22, 2024 13:32
@aanm
Copy link
Member

aanm commented Nov 22, 2024

/test

@aanm aanm added this pull request to the merge queue Nov 22, 2024
Merged via the queue into main with commit c734719 Nov 22, 2024
135 checks passed
@aanm aanm deleted the pr/rolinh/testifylint branch November 22, 2024 15:01
@maintainer-s-little-helper maintainer-s-little-helper bot added ready-to-merge This PR has passed all tests and received consensus from code owners to merge. labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/ci This PR makes changes to the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants