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
ShowPatchAction.py : Make patches better readable #5997
base: master
Are you sure you want to change the base?
Conversation
248f250
to
4332485
Compare
The printing of the patch was handled by The |
4332485
to
675c6c9
Compare
@@ -48,6 +48,8 @@ def print_beautified_diff(difflines, printer): | |||
color='red') | |||
current_line_subtracted += 1 | |||
else: | |||
printer.print(format_line(line[1:], | |||
real_nr=current_line_added)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt whether we should only use current_line_added
. The way GitHub uses to print the line number is to provide both current_line_subtracted
and current_line_added
for unchanged lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@li-boxuan Is this okay ? I think this is close to how GitHub prints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me 👍. @Makman2 what's your view on it?
d3b7ce1
to
a0b75fa
Compare
Print better diffs showing a few context lines Closes coala#5480
a0b75fa
to
68547b3
Compare
Print better diffs showing a few context lines
Closes #5480
For short term contributors: we understand that getting your commits well
defined like we require is a hard task and takes some learning. If you
look to help without wanting to contribute long term there's no need
for you to learn this. Just drop us a message and we'll take care of brushing
up your stuff for merge!
Checklist
them.
individually. It is not sufficient to have "fixup commits" on your PR,
our bot will still report the issues for the previous commit.) You will
likely receive a lot of bot comments and build failures if coala does not
pass on every single commit!
After you submit your pull request, DO NOT click the 'Update Branch' button.
When asked for a rebase, consult coala.io/rebase
instead.
Please consider helping us by reviewing other peoples pull requests as well:
corobo mark wip <URL>
to get it outof the review queue.
The more you review, the more your score will grow at coala.io and we will
review your PRs faster!