Skip to content

formatter: do not suggest incorrect form. #185

Closed Locked Answered by Antonboom
ccoVeille asked this question in Q&A
Discussion options

You must be logged in to vote

@ccoVeille please, stop spam issues

Every checker has detailed description in README.
Formatter even has a historical reference – https://github.com/Antonboom/testifylint?tab=readme-ov-file#formatter

why would this be replaced into this ... no matter the value

Because it leads to inconsistency in tests code. If people are not aware about f-funcs (90%), then when you will replace assert with Equalf, but other asserts (without Sprintf) will still use Equal

assert.Equalf(t, 1, 2, "fixed assert %s", "bar")
assert.Equal(t, 1, 2, "neighbour valid assert %s", "bar")

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Antonboom
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested wontfix This will not be worked on
3 participants
Converted from issue

This discussion was converted from issue #134 on October 03, 2024 06:33.