3 ms·
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 t
by alert0 5y ago
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.
- thegeekpirate 5y agohttps://github.com/mibk/dupl https://github.com/mibk/dupl does a great job, and it's included in https://github.com/golangci/golangci-lint https://github.com/golangci/golangci-lint (which everyone should use, tbh)
- AlphaSite 5y agoIntelliJ does this.
- grok22 5y agohttps://pmd.github.io/latest/pmd_userdocs_cpd.html https://pmd.github.io/latest/pmd_userdocs_cpd.html