launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #07689
Re: RFC: change from using lint to using a pretty printer
On 2011-06-14 15:38, Gavin Panella wrote:
On 14 June 2011 10:08, Robert Collins<robert.collins@xxxxxxxxxxxxx> wrote:
On Tue, Jun 14, 2011 at 8:21 PM, Gavin Panella
I don't follow this. There are two failure modes in pretty printers:
a) cosmetic
b) functional
If its a functional bug, we're going to notice when buildbot blows up on us.
It /may/ not blow up on us, but that would probably indicate
insufficient test coverage.
Not even that, IMHO. The examples were "repeated definitions" and
"unsafe constructs." Neither of those would blow up any test suite
until they became "inconsistent definitions" and "broken constructs."
…As they eventually will, but why wait?
Actually the dichotomy between "functional" and "cosmetic" lint isn't so
strong for me. I see a more gradual slope:
"This is wrong."
"This may not do what you mean."
"A future engineer¹ may misread your intention and create a mess."
"This may fail to show up in a grep because of unusual formatting."
All functional to me, but increasingly "cosmetic" as well.
I really like jml's point about making it easier for non-core people
to contribute, but I think prettification would ideally happen before
review, not during landing.
I agree.
Here's an alternative: if we can get a good pretty-printer, why don't we
run all our code through it right away?
There will be a painful transition but after that, the difference
between checking and reformatting (and between my lint fix and yours)
will matter a lot less. Existing code will be a better example to put
us on the right path from the start.
Jeroen
—
¹) Be nice to the future engineer. It may be you two years from now.
References