PDA

View Full Version : Actually Ignoring Unimportant Diff.s


23-Jun-2006, 01:49 PM
I've tried "everything" & I can't get it to do this as well as it alleges to.
We really need this for team VCS use w/o formatting legislation.
(java)
eg: the diff. betw/ block braces being on their own line or not
(Yes, I *have* tried the various line-end stuff, but...)

26-Jun-2006, 06:38 PM
IIRC, bc does a line-by-line compare, so if one file has a line like
foo; }
and the other file has this as 2 lines
foo;
}
Then I would *expect* bc to consider these different.

One way around this would be to use a helper program to provide uniform formatting as input to bc. A pretty printer, for instance. This is similar to some of the techniques I've seen for, as an example, excel files.

Good luck!

/dps

Chris
28-Jun-2006, 02:32 PM
Yes, the best way to deal with comparison of files with line break differences is to use something to format the code before it is opened in Beyond Compare.

For Java we already have an Add On Rule to do this. Try the Jalopy rule from:
http://www.scootersoftware.com/download.php?c=kb_morerules