PLEASE READ: Whitespace rules

Kevin Ballard eridius at macports.org
Fri Sep 7 10:31:43 PDT 2007


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:

  * 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.
  * 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.

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.

-- 
Kevin Ballard
http://kevin.sb.org
eridius at macports.org
http://www.tildesoft.com


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-dev/attachments/20070907/18ffebd6/attachment.html


More information about the macports-dev mailing list