Page 1 of 1

code comment blocks 'smarts'

Posted: Thu Jun 20, 2019 6:18 am
by harvb
I looked through some other comments and the FAQ on the site but didn't see anything specific to this request. one of our uses of examdiff is to do code comparisons when version branches take the software in different evolutionary paths. is there a way to tell examdiff to understand commented code blocks as similar instead of completely different? today, a 10 line function with // in front of each line is seen as completely different than the same function uncommented even though on a line by line basis examdiff would sense the // see them as similar lines. is there perhaps a plug-in for this?

Re: code comment blocks 'smarts'

Posted: Thu Jun 20, 2019 4:54 pm
by psguru
Could you post a screenshot?

Re: code comment blocks 'smarts'

Posted: Sat Jun 22, 2019 1:03 am
by MSpagni
That's an extremely common use of EDP for me!
To begin with, I use the detail level "lines and characters". In this way it's immediate to see that the only difference is the "//".
Then I set the fuzzy matching so that EDP can automatically understand that those lines are "almost" the same and must be correlated.
Last trick, just for the most difficult cases, I give EDP a little help by manually synchronize the beginnigs of the two blocks.