Closed XonneX closed 3 years ago
@XonneX Thanks for raising this issue and also for a really clear example of the problem and for proposing a fix.
I've really busy the past couple of days, but I'll look at this fully in the next day or two and get it merged. Sorry for the delay.
Fixed and released in 1.0.1. Thanks once again for a clear bug report and a proposed fix. Really appreciate it.
Thanks for the fast response, merge and release. I appreciate that! 😄
Hi, I'm using phpcs with sarb on windows and encountered an issue today.
Steps to reproduce:
Expected behavior
Still no errors (the history feature works in my pipeline and my docker containers, which run on linux)
Actual behavior
Errors showing, despite being in the baseline
I'm working on a windows machine. Despite that git commands return \n as line breaks. This means that DaveLiddament\StaticAnalysisResultsBaseliner\Domain\HistoryAnalyser\UnifiedDiffParser\Parser on line 62 doesn't work for me. As far as I know git returns \n on all OS and not just linux. I attached the simplest change in a PR. I'm not quite sure if git is outputting somewhere something else than \n, but if we would want to make sure that would work too, the other proposal would be something like this:
preg_split("/\r\n|\n|\r/", $diffAsString)