mgechev / revive

🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
https://revive.run
MIT License
4.74k stars 276 forks source link

fix: support method call from structures for string-format #840

Closed rmarku closed 1 year ago

rmarku commented 1 year ago

This MR fix issue #839. Here the called object method is inside a structure (common pattern for dependency injection). Before the rule was not running for this rules.

The only thing is the function scope is tied to the structure name of the object, not to the object name.

This MR tries to fix this. A test was added to the string-format to evaluate this.

Closes #839

chavacava commented 1 year ago

Hi @rmarku thanks for the PR!

(abrazo de un santiagueño a un tucumano)