[RFC] Blank lines at the end of files
Vincent Ladeuil
v.ladeuil+lp at free.fr
Sat Jun 30 07:39:31 BST 2007
>>>>> "john" == John Arbash Meinel <john at arbash-meinel.com> writes:
john> Eugene Wee wrote:
>> Hi,
>>
>> If this is taken in the direction of such a normalisation being
>> applicable to all projects that use Bazaar, perhaps it should be kept it
>> mind that the C++ standard (and perhaps C as well, I have not checked)
>> requires that non-empty source files must end in a new-line character.
>> Consequently, g++ and possibly other C++ compilers warn about missing
>> new-line characters at the end of source files.
>>
>> Regards,
>> Eugene
john> Actually, we aren't debating whether to have one '\n'
john> at the end of files, but whether to have 2.
john> I think we all agree that the final line should be '\n'
john> terminated.
I agree too :)
john> The question is whether we want or care about having a
john> line with only '\n' at the end.
john> I think I'm of the mind to just let them be. If they
john> are there, fine, but they aren't required or forbidden.
We follow the PEP8 policy to *separate* highest level items by
two empty lines.
I tend to think that leaving two empty lines at the end or only
one is like the difference between C and python (or even perl)
regarding lists:
(a, b ,c) is legal for C and python
(a,b,c,) is illegal in C but legal in python
MHO is that using:
- one final empty line should be mandatory,
- two final empty lines should be allowed,
- reverting from two to one should be discouraged or forbidden.
Vincent
More information about the bazaar
mailing list