+1 and likely this should be added to hacking so they don't sneak back in by accident / reviewers missing the line since we've had them for do long. <span></span><br><br>On Thursday, October 24, 2013, Flavio Percoco wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 24/10/13 13:38 +0100, Joe Gordon wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Since the beginning of OpenStack we have had vim modelines all over the<br>
codebase, but after seeing this patch <a href="https://review.opeenstack.org/#/c/50891/" target="_blank">https://review.opeenstack.org/<u></u>#/c/50891/</a><br>
I took a further look into vim modelines and think we should remove them.<br>
Before going any further, I should point out these lines don't bother me too<br>
much but I figured if we could get consensus, then we could shrink our codebase<br>
by a little bit.<br>
<br>
Sidenote: This discussion is being moved to the mailing list because it 'would<br>
be better to have a mailing list thread about this rather than bits and pieces<br>
of discussion in gerrit' as this change requires multiple patches. https://<br>
<a href="http://review.openstack.org/#/c/51295/" target="_blank">review.openstack.org/#/c/<u></u>51295/</a>.<br>
<br>
<br>
Why remove them?<br>
<br>
* Modelines aren't supported by default in debian or ubuntu due to security<br>
reasons: <a href="https://wiki.python.org/moin/Vim" target="_blank">https://wiki.python.org/moin/<u></u>Vim</a><br>
* Having modelines for vim means if someone wants we should support modelines<br>
for emacs (<a href="http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#" target="_blank">http://www.gnu.org/software/<u></u>emacs/manual/html_mono/emacs.<u></u>html#</a><br>
Specifying-File-Variables) etc. as well. And having a bunch of headers for<br>
different editors in each file seems like extra overhead.<br>
* There are other ways of making sure tabstop is set correctly for python<br>
files, see <a href="https://wiki.python.org/moin/Vim" target="_blank">https://wiki.python.org/moin/<u></u>Vim</a>. I am a vIm user myself and have<br>
never used modelines.<br>
* We have vim modelines in only 828 out of 1213 python files in nova (68%), so<br>
if anyone is using modelines today, then it only works 68% of the time in nova<br>
* Why have the same config 828 times for one repo alone? This violates the DRY<br>
principle (Don't Repeat Yourself).<br>
<br>
<br>
Related Patches:<br>
<a href="https://review.openstack.org/#/c/51295/" target="_blank">https://review.openstack.org/#<u></u>/c/51295/</a><br>
<a href="https://review.openstack.org/#/q/status:open+project:openstack/" target="_blank">https://review.openstack.org/#<u></u>/q/status:open+project:<u></u>openstack/</a><br>
nova+branch:master+topic:<u></u>noboilerplate,n,z<br>
<br>
</blockquote>
<br>
<br>
/me is a vim user!<br>
<br>
+1 on removing those lines!<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
best,<br>
Joe<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
______________________________<u></u>_________________<br>
OpenStack-dev mailing list<br>
<a>OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack-dev</a><br>
</blockquote>
<br>
<br>
-- <br>
@flaper87<br>
Flavio Percoco<br>
<br>
______________________________<u></u>_________________<br>
OpenStack-dev mailing list<br>
<a>OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack-dev</a><br>
</blockquote>