Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a file diff tool that allows for exceptions?

We currently use Beyond Compare 3.0 and I am quite pleased with it. However, it would be great if I could easily specify an exclusion for a specific one-time case. This is needed when I am doing a code review of some refactoring. For instance:

Old code

doSomething(ConstantsInterface.FOOBAR);

New code:

doSomething(BetterEnumeration.FOOBAR);

In this case, I have hundreds of changes that I am reviewing that are essentially all the same exact change and I just want to see the exceptions. It would be great if I could easily specify an exception that indicates these two cases are equal. I know of a way to do it in the grammar, but it is tedious and cumbersome in the case where there are ten or so exceptions.

Any other tips?

like image 562
Kevin Avatar asked Nov 06 '22 13:11

Kevin


1 Answers

Beyond Compare's Pro edition supports ignoring renamed identifiers. It's covered in the help here, and there's a video demonstration of it here. It's not limited to just identifiers either; it can handle things like i=i+1 => i++. If you have a recent version installed you can just right click on the difference and select "Replacement..." to get started.

like image 93
Zoë Peterson Avatar answered Nov 14 '22 22:11

Zoë Peterson