How to prevent alignment on a single matching character?
I see that people already complained that BC picks some random characters from a line, matches them to some characters from another line and declares the lines aligned.
As the result line:
- (id)retain
aligns with
void removeThisRequestAsync()
simply because both of them have letters 'r', 'e' and 'n'!
This is so wrong!
Then the rest of the file is aligned incorrectly.
Actually the first file has line "removeThisRequestAsync" few pages below,
but that 3 character match prevented BC to search further.
How can I prevent it?
I tried all settings under Session -> Alignment,
but they are only for lines, not for characters.
I would like to specify that lines should be only matched if they have an identical word
or if certain number of contiguous characters match,
but I could not imagine in which case matching randomly picked non-contiguous characters would make sense.
Currently I am trying to modify my files to reduce the number of equal characters.
I cannot rename "retain" since it is a keyword.
I tried to replace "removeThisRequestAsync" by "deleteThisRequestAsync",
but BC again matches it with "retain" because both have letters 'e', 't' and 'n'!
Then I replaced "removeThisRequestAsync" by "removeThisRequest"
Still, BC matches it to "retain" simply because they have a single character 'r'!
But this way you can match any text to any other!
Does not make any sense.
I understand when '{' matches '{' because it is a stand alone token,
but matching a single character within a word in Java code seems to be a bug.
Note: I cannot use Session -> "Never Align Differences" option
because I need to align when entire words match, for example:
self.somePropertyName = 1;
should align with
somePropertyName = 1;
Thank you
I see that people already complained that BC picks some random characters from a line, matches them to some characters from another line and declares the lines aligned.
As the result line:
- (id)retain
aligns with
void removeThisRequestAsync()
simply because both of them have letters 'r', 'e' and 'n'!
This is so wrong!
Then the rest of the file is aligned incorrectly.
Actually the first file has line "removeThisRequestAsync" few pages below,
but that 3 character match prevented BC to search further.
How can I prevent it?
I tried all settings under Session -> Alignment,
but they are only for lines, not for characters.
I would like to specify that lines should be only matched if they have an identical word
or if certain number of contiguous characters match,
but I could not imagine in which case matching randomly picked non-contiguous characters would make sense.
Currently I am trying to modify my files to reduce the number of equal characters.
I cannot rename "retain" since it is a keyword.
I tried to replace "removeThisRequestAsync" by "deleteThisRequestAsync",
but BC again matches it with "retain" because both have letters 'e', 't' and 'n'!
Then I replaced "removeThisRequestAsync" by "removeThisRequest"
Still, BC matches it to "retain" simply because they have a single character 'r'!
But this way you can match any text to any other!
Does not make any sense.
I understand when '{' matches '{' because it is a stand alone token,
but matching a single character within a word in Java code seems to be a bug.
Note: I cannot use Session -> "Never Align Differences" option
because I need to align when entire words match, for example:
self.somePropertyName = 1;
should align with
somePropertyName = 1;
Thank you
Comment