PLEASE READ: Whitespace rules
Simon Ruderich
simon at ruderich.com
Fri Sep 7 11:53:33 PDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Kevin Ballard wrote:
> Last time this was brought up only one person complained, but it really
> is a serious problem and we need standards. Therefore I propose the
> following:
If I remember correctly, last time was decided every port maintainer can
use his/her own rules.
Even if there is no standard rule with this, I think we should give
every maintainer/developer the freedom to choose this on his/her own.
> * All source code files MUST use soft tabs at a tabstop of 4. No hard
> tabs are allowed.
> * All source code files SHOULD have the following as the first line of
> the file:
> # -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil;
> c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
> This is a modeline that works for both emacs and vim.
I really don't like this! Why add "useless" additional data to every
file just because two editors work a bit better with this lines? There
are many, many texteditors out there and why add additional information
for only two of them (not counting the clones here).
If emacs and vim users want to use standard settings for Portfiles then
they can modify their editor settings.
Please don't get me wrong, I really like vim (haven't worked with emacs
yet), but I don't use it as main editor. And seeing this unnecessary
information annoys me every time. Couldn't everybody just use his/her
own settings? Without this additional line.
By the way, the line is too long for 78 columns, so it would have to be
split in two.
> * Portfiles SHOULD use soft tabs at a tabstop of 4, but implementation
> of this is left up to the discretion of the maintainer.
> * Portfiles SHOULD use the given modeline
> * Makefiles MUST use tabs as it is required by the syntax. Makefiles
> SHOULD use a tab stop of 4.
> * Makefiles MAY use a modeline. The following works for emacs and vim:
> # -*- Mode: Makefile; tab-width: 4; indent-tabs-mode: t -*-
> vim:noet:sw=4:ts=4
> * All other files (documentation, etc) SHOULD use soft tabs at a
> tabstop of 4 if the document format allows.
> * All other files (documentation, etc) SHOULD NOT use a modeline as it
> is probably meant for human consumption.
All those changes will just end in a tabs/spaces war; some people like
tabs more, others spaces. And then there is a wide range of tabs or soft
tabs lengths, 8, 4, 2 ... the list goes on. I think we can't find an
agreement here, so everybody should do it like he/she prefers. And
because it's no difficulty in reading a file with other tab/space rules
there shouldn't be a problem for anyone.
Personally I prefer soft tab stops with the size of 2. Why is this
better or worse then other rules?
> Does anybody have suggestions for any changes? If not, I recommend
> implementing this immediately. Every time I edit a file I will be
> converting it to this format and committing in a separate changeset to
> keep the svn history and diffs clean. I recommend everybody do this.
I'm sorry if this mail sounded a bit rude, but I think we should all
come to a consensus here, before we make quick decisions.
If I update a Portfile I try not to modify the tab/space rules of this
Portfile, so I just adapt. That shouldn't be a problem.
And please wait for other maintainers/developers to comment on this
before you make any changes to the portfiles. I think all should comment
on this.
Simon
- --
+ privacy is necessary
+ using http://gnupg.org
+ public key id: 0x6115F804EFB33229
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
iD8DBQFG4Z4tYRX4BO+zMikRCmeMAKC88AapQ40lBUvp15SurefF0yTdCwCfekeh
h7Sw/oAtTQ4G/oLnQ9bjPdE=
=jHwI
-----END PGP SIGNATURE-----
More information about the macports-dev
mailing list