On Tue, Jun 14, 2011 at 8:21 PM, Gavin Panella <gavin.pane...@canonical.com> wrote: > On 14 June 2011 01:55, Robert Collins <robe...@robertcollins.net> wrote: > [...] >> So, I'd like to propose we do something other projects do: restrict >> lint to reporting on functional issues, and use an idempotent pretty >> printer to reformat our code automatically. > > Do you have a pretty printer in mind? 30 seconds on Google didn't turn > up anything.
http://pypi.python.org/pypi/PythonTidy is one; I haven't done a comprehensive search as yet. >> We would add a post-commit hook in pqm that would reformat the changed >> files using the pretty printer, and we'd no longer need to spend any >> time thinking or worrying about formatting. > > I think that's a neat idea. but the pretty printer has to be > completely trustworthy. The moment it makes one wrong assumption > (*that we notice*) about what was intended we'll all be trying to > learn the tricks and intricacies of the pretty printer instead of just > writing code that others can read. 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. if its a cosmetic bug, it will be consistent - but we don't need to worry about matching the pretty printer ourselves - anything we do different it will fixup-as-we-land. > On the whole, I think I'd prefer to silence the less useful warnings > from the linter (like 2 spaces before an inline comment, and blank > lines around locally defined functions). > > I'd also just prefer to know that what landed was what I wrote and > what was reviewed. Why? I'm not trying to troll - it genuinely doesn't seem like a useful thing to spend neurons on. -Rob _______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : launchpad-dev@lists.launchpad.net Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp