defluffing Portfiles (port lint)

Anders F Björklund afb at macports.org
Tue Jul 10 16:06:10 PDT 2007


Ryan Schmidt wrote:

>> The simple solution being defining tabs to something like 8.
>
> To bring back some of the arguments from earlier threads: I do not 
> wish to configure my editor to use 8-space tabs. I prefer 4-space 
> tabs. This is why editors let you change the tab width: because it's a 
> personal preference. Do not force your personal preferences on me. 
> Different people prefer 4- or 8- or 2- or 3-space tab settings in 
> their editors, and that's just fine. They should be allowed to do 
> that.

It's of course possible to keep indentation in Portfiles
up to the port maintainer. Maybe I should have mention that
suggested "port lint" didn't actually check any indentation,
just the use of newlines between certain port constructs...

BTW; 8 is the default Unix hard tab size, not anything personal
(it will show up when using for instance a browser or terminal)

> But this is the reason why using tabs to keep columns aligned is a bad 
> idea and should not be done -- columns become unaligned for all 
> tab-width settings other than the one the author used. This is also a 
> reason why using spaces everywhere, even for line indentation, is bad 
> IMHO: it forces your personal line indentation preference on everyone 
> else.

Unless there is a common project line indentation standard,
it's no useful idea of trying to force anything upon anyone.

> Other users will of course argue that their editors are configured to 
> use spaces, and they do not wish to reconfigure their editors to use 
> tabs... I think this is where we stalemated last time.

Maybe just keep it flexible then ? Or leave it to the Portfile
prettyprinter, to show the Portfiles in some readable manner...
(and adding some syntax coloring wouldn't hurt either, probably
can use Tcl with some extra keywords for the common variables?)

Standardizing the variable order might not be a bad thing though,
nor providing a Portfile template (whether blank or interactive).

--anders




More information about the macports-dev mailing list