[bind10-dev] redundant white spaces and colored git diff
Tomasz Mrugalski
tomasz at isc.org
Mon Jun 20 20:32:24 UTC 2011
On 20.06.2011 20:23, JINMEI Tatuya / 神明達哉 wrote:
> In my code review I often find trivial and very minor editorial
> issues: redundant white space(s) after the end of line or in a blank
> line.
>
> These are basically very minor and wouldn't be a big issue in terms of
> code sharing (unlike the mixed use of inconsistent styles), but it can
> be cleaned up with minimal effort and would make the code more
> "professional" (by showing it's carefully written), so I think it's
> worth addressing in terms of the cost-benefit balance.
>
> Colored version of git diff is a very effective tool to identify these
> editorial issues. See, e.g.:
> http://gyazo.com/bdd070d0925080fabcc279a2984080f2.png
> (the red cursors indicate redundant white spaces)
>
> So I'd suggest before anyone starts asking for code review the entire
> diff is checked and redundant spaces are removed.
There's also whitespace-mode for emacs that is useful for that sort of
things. Useful commands-are:
M-x whitespace-mode (enable/disable whitespace-mode)
M-x whitespace-cleanup (cleans up current buffer)
It can also print out detected issues when emacs opens up a file.
Complete documentation: http://www.emacswiki.org/emacs/WhiteSpace
Hope that helps,
Tomek
More information about the bind10-dev
mailing list