Ignore line wrapping differences?

Discussion of open issues, suggestions and bugs regarding file and folder merge tool – Code Compare
Post Reply
FrankE
Posts: 2
Joined: Mon 18 Jan 2021 18:17

Ignore line wrapping differences?

Post by FrankE » Mon 18 Jan 2021 18:50

One of the reasons I'm looking at Code Compare is because I've got code that was reformatted by one of the folks who worked on it and I'd like to be able to ignore those differences when comparing.

Here is the simplest example I could create:

File 1:

Code: Select all

#include <stdio.h>

int main (int argc, char ** argv) {
printf("Hello World\n");
}

File 2:

Code: Select all

#include <stdio.h>

int main (int argc, char ** argv)
{
printf("Hello World\n");
}
Image https://imgur.com/a/6X3R2Ml

The only difference is the opening brace that got put on the following line in the new copy.

This gets flagged as a difference, even with ignore white space, ignore line breaks, and structural code comparison enabled.

Is there any way to get Code Compare to not display that as a difference?

Thanks for any help you can offer.

ekaterinag
Devart Team
Posts: 34
Joined: Wed 06 Nov 2019 06:48

Re: Ignore line wrapping differences?

Post by ekaterinag » Wed 20 Jan 2021 10:34

Hi,

I'm afraid, you cannot make that block totally disappear.

But you may try to enable the following options in the Comparison tab http://prntscr.com/xa53mp
If they help you, please check the boxes for them in the settings on regular basis here http://prntscr.com/xa55uq

Best wishes,
Devart Team

FrankE
Posts: 2
Joined: Mon 18 Jan 2021 18:17

Re: Ignore line wrapping differences?

Post by FrankE » Wed 20 Jan 2021 13:07

Thank you for the answer!

ekaterinag
Devart Team
Posts: 34
Joined: Wed 06 Nov 2019 06:48

Re: Ignore line wrapping differences?

Post by ekaterinag » Thu 21 Jan 2021 06:34

You are welcome!

Best wishes,
Devart Team

Post Reply