-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC add line numbers #64
POC add line numbers #64
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;
patch
tool\No newline at end of file
to the output when a string has not a line break as last character, making the output not compat with thepatch
toolpatch -u
and can be consumed likediff -u
for example
diff
picks 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 file
is 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.