nunnatsa / ginkgolinter

golang linter for ginkgo and gomega
MIT License
25 stars 6 forks source link

Add new rule: don't use `fmt.Sprintf` for assertion description #50

Closed nunnatsa closed 1 year ago

nunnatsa commented 1 year ago

As the gomega assertion methods (To, NotTo ToNot, 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.

Fixes #48

Not sure this is needed. See discussion in #48

/hold

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 4217053645


Totals Coverage Status
Change from base Build 4215736834: 0.4%
Covered Lines: 573
Relevant Lines: 647

💛 - Coveralls
nunnatsa commented 1 year ago

/hold

nunnatsa commented 1 year ago

/unhold

nunnatsa commented 1 year ago

/unhold

nunnatsa commented 1 year ago

/hold

nunnatsa commented 1 year ago

/hold

nunnatsa commented 1 year ago

Closing for now. I think it's overkill.