FS#41400 - [vim-runtime] Hard-Coded Enforcement of Coding Style in Python File Types Plugin

Attached to Project: Arch Linux
Opened by G. M. (NoSuck) - Wednesday, 30 July 2014, 18:27 GMT
Last edited by Dave Reisner (falconindy) - Thursday, 31 July 2014, 12:19 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Different people have different coding styles. A file type plugin should not enforce a particular style of coding.

A Google employee, for example, would be forced to hack around Arch's vim installation, as company standards mandate two-space indentation.

Furthermore, PEP 8 only addresses code intended for the Python standard library and specifically warns against overreaching enforcement: "Many projects have their own coding style guidelines. In the event of any conflicts, such project-specific guides take precedence for that project." (http://legacy.python.org/dev/peps/pep-0008/)
This task depends upon

Closed by  Dave Reisner (falconindy)
Thursday, 31 July 2014, 12:19 GMT
Reason for closing:  Upstream
Additional comments about closing:  file not provided by Arch, but by upstream.
Comment by Dave Reisner (falconindy) - Wednesday, 30 July 2014, 20:30 GMT
What file are you referring to which is enforcing style? /usr/share/vim/vim74/ftplugin/python.vim? That isn't a file provided by Arch, but by Vim upstream.

> A Google employee, for example, would be forced to hack around Arch's vim installation, as company standards mandate two-space indentation.
This is a really weird claim. The stock configuration would never facilitate writing code which passes Google's extensive pylint rules (nor would one ever be using Arch on a Google-issued machine, or writing Google code on a non-Google-issued machine).
Comment by G. M. (NoSuck) - Thursday, 31 July 2014, 02:19 GMT
Yes, that is the file. I did not realize it was the unaltered upstream version. Thank you for pointing that out. I will make a report upstream.

The Google example is not a weird claim, and it in no way suggests rewriting ftplugin/python.vim to conform to Google's standards. Rather, it illustrates benefits of enforcing no standards. Also, I do not understand your claim that one would never write Google code on a non-Google-issued machine. For a counterexample, author a patch on an Arch machine for the following file:

https://code.google.com/p/mozc/source/browse/trunk/src/android/split_abi.py

Loading...