[openstack-dev] Remove vim modelines?
Joe Gordon
joe.gordon0 at gmail.com
Tue Oct 29 13:18:05 UTC 2013
On Tue, Oct 29, 2013 at 11:17 AM, Robert Collins
<robertc at robertcollins.net>wrote:
> On 28 October 2013 23:54, Joe Gordon <joe.gordon0 at gmail.com> wrote:
>
>
> > We don't just gate without telling people, the first two items in hacking
> > are read pep8
> >
> > http://docs.openstack.org/developer/hacking/
>
> The gate is super useful, but it's reactive, not proactive. And good
> documentation isn't a replacement for just doing the right thing.
>
And what is the right thing? From what you have said my understand is that
the correct thing is: To keep the barrier to entry for new developers as
low as possible by including modelines in every file so that anyone who
uses vim and uses modelines have the correct tabstop etc. But this isn't
enough to pass gate (
http://www.python.org/dev/peps/pep-0008/#whitespace-in-expressions-and-statements
etc),
so unless someone runs flake8 or 'tox -epep8' locally they will still end
up with the gate failing them. So I don't think the current state of
modelines reduces the barrier to entry in a meaningful way (At the very
least, if we keep them they should be on every file).
>
>
> >> > * Why have the same config 828 times for one repo alone? This
> >> > violates the DRY principle (Don't Repeat Yourself).
> >>
> >> Because afaik there's no standard way to inform editors of
> >> project-specific style guidelines. Plus previously mentioned benefit of
> >> stickiness.
> >
> >
> > PEP8 is hardly project specific.
>
> The definition of PEP8 is (moderately) global. The choice to use PEP8
> is project specific.
>
Yup, That is why I didn't say 'everyone uses PEP8,' when using PEP8 I was
referring to the definition (and not even the python library).
>
>
> >> That's not very welcoming. If a project want to be particular about
> >> its style, it has a responsibilty to not just gate but also assist in
> >> following that style.
> >
> > We do try to make it easy to follow the style. Its fully documented here
> > http://docs.openstack.org/developer/hacking/. Also the modeline we use
> is
> > hardly enough to follow the style (80 char limit, spacing between
> functions,
> > between classes etc.) And we provide several ways for a user to run the
> full
> > set of style tests locally.
>
> Documentation isn't the same as helping. Yes, it's true that the modeline
> isn't
> sufficient, but it does get some of the key variation project
> guidelines tend to have: spaces and tabs.
>
> -Rob
>
>
> --
> Robert Collins <rbtcollins at hp.com>
> Distinguished Technologist
> HP Converged Cloud
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20131029/a66393a0/attachment.html>
More information about the OpenStack-dev
mailing list