POC add line numbers#64
POC add line numbers#64sebastianbergmann merged 2 commits intosebastianbergmann:masterfrom SpacePossum:master_add_line_numbers
Conversation
Codecov Report
@@ Coverage Diff @@
## master #64 +/- ##
============================================
+ Coverage 99.71% 99.73% +0.02%
- Complexity 138 146 +8
============================================
Files 10 10
Lines 347 377 +30
============================================
+ Hits 346 376 +30
Misses 1 1
Continue to review full report at Codecov.
|
Actually, I would keep it |
|
The test in question interacts with the filesystem and assumes that |
|
of course it would not. that's why there is |
|
Sure; but even on Linux |
|
@SpacePossum , is there anything else in big epic of introducing line numbers ? |
|
@keradus I've nothing major planned left for this. (thanks for reviewing/merging all btw. :) I'll clean up the test a bit more in the near future ) |
|
@SpacePossum Are we ready for the |
|
And are any of those refinements BC breakers ? |
|
since the API has been closed down as it is now ( |
|
@SpacePossum May I tag |
|
@sebastianbergmann lets do it :) |
This PR introduces the line numbers to the
UnifiedDiffOutputBuilder(finally ;) )However there a few things to consider;
patchtool\No newline at end of fileto the output when a string has not a line break as last character, making the output not compat with thepatchtoolpatch -uand can be consumed likediff -ufor example
diffpicks 3 lines above and below a changed line (-u, -U NUM, --unified[=NUM] output NUM (default 3) lines of unified context)I left the incompats because;
\No newline at end of fileis only of value when diff'ing files, and not arbitrary strings as typically done by PHPUnitI plan on writing a full compat version of the output builder so we can offer it 3rd party.
Let me know what you all think :)
ping @keradus @julienfalque please have a look if you've time
PS.
The last commit contains a test that is prop. best not merged to the repo, but is very handy when debugging.