Re:Rf: an experimental refactoring tool for Go
by alert0 on Monday May 24, 2021 @11:29PM
(#27272312)
I've always wanted a tool that finds duplicate code (with minor variable name differences) so I can factor it out. Often when prototyping I'll copy a function thinking it will change a lot or maybe just not knowing what will change. As the application matures I'll go back and clean these up but it shouldn't be too hard for a tool to identify.
[ Parent
| on HN ]
Re:Rf: an experimental refactoring tool for Go
by thegeekpirate on Monday May 24, 2021 @11:51PM
(#27272415)
https://github.com/mibk/dupl does a great job, and it's included in https://github.com/golangci/golangci-lint (which everyone should use, tbh)
Re:Rf: an experimental refactoring tool for Go
by AlphaSite on Monday May 24, 2021 @11:59PM
(#27272457)
IntelliJ does this.