Closed Frassle closed 9 months ago
Noticed when running "--fix" against a codebase that made use of "%[1]s" and "%s" format directives.
Without the fixes the negative test incorrectly tries to concatenate:
- fmt.Sprintf("%s %[1]s", "hello") + "hello" + " %[1]s"
and the positive test doesn't:
- "Hello says " + s // want "fmt.Sprintf can be replaced with string addition" + fmt.Sprintf("Hello says %[1]s", s) // want "fmt.Sprintf can be replaced with string addition"
Thanks @Frassle for the report and the fix
Any other feedback ?
Nope, otherwise seems to have worked as advertised 👍
Noticed when running "--fix" against a codebase that made use of "%[1]s" and "%s" format directives.
Without the fixes the negative test incorrectly tries to concatenate:
and the positive test doesn't: