4 ms·
Can I use it to detect Copy & Paste within my company's own codebase?
by playingalong 2y ago
Can I use it to detect Copy & Paste within my company's own codebase?
- chuckadams 2y agoJetbrains IDEs will flag duplicate code of N lines (configurable) or more. Just run the inspection manually and there you go. You can even do it in batch in CI nowadays.
- maleldil 2y agoI've had some success with PMD/CMD [1]. It's Java-based, though, which could be a pain, depending on your setup. If your codebase uses Python, you can use Pylint for this, too. [1] https://pmd.github.io/pmd/pmd_userdocs_cpd.html https://pmd.github.io/pmd/pmd_userdocs_cpd.html
- willy_k 2y agoWhat do you need that for? It’s not really cheating when it’s going into a product, if it works it works. In a hypothetical ideal corporate environment wouldn’t it be preferred if one could save company time by copy and pasting?