3 ms·
My reply to Scott Meyers concerning the detection of Copy-Paste errors
- zwieback 15y agoThat's very interesting and ambitious. I just started using Coverity for my code and find that eliminating false positives trumps all other features of static code analysis. Sending error reports to third parties that supplied source means I have to be very precise and absolutely sure that it's really a defect, otherwise I get no cooperation. I think it would be really interesting to develop a way of triggering static analysis rules for case-and-paste errors when the actual pasting is taking place, e.g. keeping track of what was typed in and what was pasted in. Maybe that would allow you to do things more aggressively.
- grandinj 15y agoThere is an open-source copy paste detector called CPD. It's part of the Java PMD project (pmd.sf.net), but it should work on C/C++ code.