← Back to team overview

launchpad-dev team mailing list archive

Re: RFC: change from using lint to using a pretty printer

 

On 2011-06-14 11:13, Robert Collins wrote:
On Tue, Jun 14, 2011 at 8:51 PM, Julian Edwards
<julian.edwards@xxxxxxxxxxxxx>  wrote:

Can you expand on the value you get? What does it do for you / us to
be told about whitespace and indentation variation?

If I may just butt in here, are we all talking about the same thing?

There's "ensuring consistent whitespace" (which I find immensely useful and I hope is not under discussion) and there's "being told about inconsistent whitespace" (which we may be better off without).

The potential harm in auto-formatting is proportional to the risk of the mistakes it fixes. If indentation is suspicious, it's probably best to call a human. But at the other extreme, sometimes whitespace warnings have been about sorely-needed comments being incomplete. (Ideally missing capitalization or punctuation would tell you about this as well, but that advantage is lost when writing gets too sloppy).

One possible compromise would be to review a diff of each auto-formatting. One thing we keep hearing after all is that it's helpful to recognize familiar code visually. If we develop an eye for reformatting problems, we may retain the same accuracy but with less distraction.


Jeroen


References