Portfile whitespace issues

Ryan Schmidt ryandesign at macports.org
Thu Mar 15 00:12:46 PDT 2007

On Mar 14, 2007, at 19:27, Paul Beard wrote:

> On Mar 14, 2007, at 4:53 PM, Yves de Champlain wrote:
>> While it is not a bad idea to write it on the list, it should be  
>> included in some Portfile guide.  Maybe not too far from the svn  
>> properties

What we should do is this:

- Inform both mailing lists that we want to excise all tab (ASCII 09)  
characters from all Portfiles.

- Advise all port maintainers to fix their Portfiles to comply with  
this directive, using the expand program, using 4- or 8-space-width  
tabs, as per their original intention for the Portfile, so that  
columns line up correctly.

- Advise port maintainers that we prefer 4-space-width indentation.

- After some period of time, to allow port maintainers to do this, we  
run a batch process of all remaining tab-containing Portfiles to  
convert tabs to 4 (or 8, whatever seems like the best fit)-space- 
width tabs.

- Install a pre-commit hook that prevents commits of Portfiles that  
contain tabs, printing a message showing the user how to entab and  
detab their files using the expand and unexpand programs. I can write  
this hook script.

I don't think there's even any reason to document this in the wiki or  
anywhere else, since someone who already uses spaces will not notice,  
and anyone who uses tabs will be prevented from doing so, and  
instructed at that time how to easily convert their Portfile so that  
it is acceptable.

> Not that I want to tamp down a good flame war before it starts, but  
> should this be redirected to the -devel list?
> In my limited experience, it seemed to work to use tabs and let  
> their width be set in the editor.

Well, the discussion took place on the macports-devel list last  
month, at some length:


There were not that many participants. I tried to put up a fight in  
favor of keeping hard tabs, but I was the only one. :-) Upon further  
consideration, I don't think I really care that much one way or  
another, and I do recognize that a whole class of spacing issues we  
currently have in Portfiles would not occur if we did not use tabs.  
So, let's take 'em out!

> my .exrc has these options set:
> set number
> set tabstop=3
> set sw=16
> set ai
> set showmatch


To reply to the mailing list, please use your mailer's Reply To All  

More information about the macports-users mailing list