As the gomega assertion methods (To, NotToToNot, Should and ShouldNot) are a formatting functions, that accepts a format string + parameters starting from the 2nd parameter, there is no need to use fmt.Sprintf for assertion description.
This PR add an optional rule to warn about using fmt.Sprintf as assertion description. It is not enabled by default. Use the -allow-sprintf=false flag to enable this rule.
As the gomega assertion methods (
To
,NotTo
ToNot
,Should
andShouldNot
) are a formatting functions, that accepts a format string + parameters starting from the 2nd parameter, there is no need to usefmt.Sprintf
for assertion description.This PR add an optional rule to warn about using
fmt.Sprintf
as assertion description. It is not enabled by default. Use the-allow-sprintf=false
flag to enable this rule.Fixes #48
Not sure this is needed. See discussion in #48
/hold