Introducing Diffscuss: Plain Text Code Reviews, Right in Your Editor
Earlier this year we at Hut 8 Labs were working onsite with a client who didn’t have their own code review system. Since a life without code reviews just isn’t worth living for us, we found ourselves emailing diffs back and forth to each other, with messages like “about halfway through the diff you do X, maybe you should do Y?” Eventually we even started inserting comments right in the attached diffs themselves—comments like “EWJ RENAME THIS VARIABLE OR DIE IN A FIRE!!!”—which worked surprisingly well, except that:
it was easy to miss comments and replies in large diffs, even when the comments were all caps and followed by multiple exclamation points
it was a pain to co-ordinate reviews and replies from even two other people
it was a pain to track down the actual source lines a comment referred to, which meant an unpleasantly high activation energy for applying small fixes and suggestions
So we created diffscuss—a code review format based on unified diffs, with editor support for threaded inline comments, basic review management and git integration, and (best of all) support for jumping right from a comment to the local source it addresses, without ever leaving the comfort of Emacs (or, because Hut 8’s own Matt Papi is a Vimmortal, Vim).
We’ve been using diffscuss for about 6 months now, and we’ve been happy enough with it that we figure it’s time to share it with the world.
Check it out at Github or read on for an example of diffscuss in action.
For example, here you are using diffscuss in Emacs, reading a comment that Some Guy left in your code. (Click if you want a larger image.)
You decide you agree with him and want to make the change, so you hit
C-c s” and Emacs pops up the local source file for you, with
the cursor already positioned on the relevant line. (Again, click for
a larger image.)
You make the change, save the buffer, and switch right back to the review buffer. (Click for…you know the drill.)
C-c C-c” opens up a new comment, and you reply.
Easy peasy lemon squeezy.