[openstack-dev] [Quantum] Windows ^M (Carriage Return) policy
Alessandro Pilotti
ap at pilotti.it
Wed Jan 16 09:48:05 UTC 2013
Hi,
Python has no issues with CRLF or LF return sequences, but I'd go with LF only for the followin reasons:
Most Linux editors don't recognizig CRLF, e.g. "vi" shows "^M"
Consistency with the rest of the project source code
Git has an optional feature on Window to automatically convert CRLF->LF during push, but this cannot be used in cases in which the developer works also on unrelated projects where CRLF as a required convention.
As checking for forgotten CRLF returns on Windows requires a file by file inspection, my proposal is to add a check in "tox" to refuse files with CRLF endings and also a visual highlight in the Gerrit source / diff viewer for visual identification of those line endings during review.
Note: I'd apply the above rules across all openstack projects, not only Quantum.
Thanks,
Alessandro
On Jan 16, 2013, at 06:00 , Zhongyue Luo <zhongyue.nah at intel.com>
wrote:
> These are the files
>
> ./quantum/tests/unit/hyperv/test_hyperv_rpcapi.py
> ./quantum/tests/unit/hyperv/test_hyperv_quantum_plugin.py
> ./quantum/tests/unit/hyperv/__init__.py
> ./quantum/tests/unit/hyperv/test_hyperv_quantum_agent.py
> ./quantum/plugins/hyperv/common/__init__.py
>
>
> On Wed, Jan 16, 2013 at 11:50 AM, Zhongyue Luo <zhongyue.nah at intel.com> wrote:
> Hi team,
>
> I've found out that the current hyperv patch has ^M in the files that was merged.
>
> I have experienced this debate on allowing carriage returns or not in the source code in the companies I've worked in and didn't quite get to a conclusion.
>
> So I was wondering how OpenStack is willing to handle this issue.
>
> Is is allowed as long as it's Windows related code?
> Then what if I edit a file on Windows which is not related to Hyperv?
>
> Thanks
>
> --
> Intel SSG/SSD/SOTC/PRC/CITT
> 880 Zixing Road, Zizhu Science Park, Minhang District, Shanghai, 200241, China
> +862161166500
>
>
>
> --
> Intel SSG/SSD/SOTC/PRC/CITT
> 880 Zixing Road, Zizhu Science Park, Minhang District, Shanghai, 200241, China
> +862161166500
> _______________________________________________
> 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/20130116/1c8f59d8/attachment.html>
More information about the OpenStack-dev
mailing list