Page 1 of 1

Ignore line wrapping differences?

Posted: Mon 18 Jan 2021 18:50
by FrankE
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.

Re: Ignore line wrapping differences?

Posted: Wed 20 Jan 2021 10:34
by ekaterinag
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

Re: Ignore line wrapping differences?

Posted: Wed 20 Jan 2021 13:07
by FrankE
Thank you for the answer!

Re: Ignore line wrapping differences?

Posted: Thu 21 Jan 2021 06:34
by ekaterinag
You are welcome!

Best wishes,
Devart Team