CodesAway / CodesAway/BEXCodeCompare
Improve ignore comments logic
- Dominant language
- Java
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
When comparing, improve handling when ignore comments
* If only change in line is adding / deleting comments, should ignore
* This handles the common case of adding a line comment on the same line as existing code
* The current code only handles if the entire line is a comment and is added / removed
* When handling split lines, should ignore comments
* For example, a recent work cleanup I did in a file removed comments and combined lines
* If ignoring comments, this difference should be ignored
To handle the second scenario, I'm improving the split line logic to accept a normalization function that takes Indexed, so it knows of the line number. This info combined with the BEXString which can indicated commented out code will allow normalizing away commented out code and ignoring it.
A new NormalizationFunction class is being added and existing methods are being overloaded to take the new class as wall as keep the existing signature, calling the new overloaded methods, by first wrapping the BiFunction into a NormalizationFunction (using the static **normalization** method)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.