3 ms·
Coverity actually has a really good tracking ability where it will find code that was copy/pasted/edited but the edit looks wrong. I can't remember the name, b
by taeric 10y ago
Coverity actually has a really good tracking ability where it will find code that was copy/pasted/edited but the edit looks wrong.
I can't remember the name, but it will identify what it thinks is the original, and show where the copy/paste is, along with the edit it thinks was missing. This was usually around some error handling logic in our code base. Think:
if (checkIsValid(foo)) {
printf("Looks like foo is not valid. foo == %s\n", foo);
}
Wasn't uncommon for someone to copy that and forgot to change all places "foo" appeared.
Long story short, advanced static analysis has come a long way.