[Surfraw-devel] Surfraw Style Guide RFC
Lucas Hoffmann
l-m-h at web.de
Tue Oct 14 13:43:24 UTC 2014
I'm sending a small patch for the STYLE file in order to add functions
and define the preferred style similar to for and if statements.
I also noticed that my last mail was only send to Jason. Is it possible
that the mailing list does not create Reply-To: headers for the list but
for the actual sender? Should this be changed?
Here are the comments on the style guide that I sent (accidentally, only)
to Jason:
* I prefer spaces over tabs as they do not change their size depending
on editor/printer/user preference ... If we use spaces we can stick
with 4.
* Furthermore I suggest adding a vim modeline (and maybe something similar
for emacs?) to the main file at least. For example
> vim: tw=80 et sw=4
or
> vim: tw=80 noet sw=0
Attached is the patch for the STYLE file (which does not include these
two points yet). I suggest the following commit message:
> Fix small typo and add function style.
@Jason or whoever does the actual commit: You can use the '--author'
git option with the information in the From: header of the person who
send a patch then you don't have to mention them in the commit message.
Cheers
Lucas
-------------- next part --------------
From 72954b72bdafe826a7d4cb0a31096b0bc13886b6 Mon Sep 17 00:00:00 2001
Message-Id: <72954b72bdafe826a7d4cb0a31096b0bc13886b6.1413293196.git.l-m-h at web.de>
From: Lucas Hoffmann <l-m-h at web.de>
Date: Tue, 14 Oct 2014 14:38:33 +0200
Subject: [PATCH] Fix small typo and add function style.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.1.1"
This is a multi-part message in MIME format.
--------------2.1.1
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
STYLE | 24 ++++++++++++++++++------
1 file changed, 18 insertions(+), 6 deletions(-)
--------------2.1.1
Content-Type: text/x-patch; name="0001-Fix-small-typo-and-add-function-style.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Fix-small-typo-and-add-function-style.patch"
diff --git a/STYLE b/STYLE
index 90b1d1b..f5228b7 100644
--- a/STYLE
+++ b/STYLE
@@ -1,11 +1,11 @@
- ____ _______ ___ _____
+ ____ _______ ___ _____
/ ___|_ _\ \ / / | | ____|
- \___ \ | | \ V /| | | _|
- ___) || | | | | |___| |___
+ \___ \ | | \ V /| | | _|
+ ___) || | | | | |___| |___
|____/ |_| |_| |_____|_____|
-
-
+
+
It's important to rage against the web in _style_. Fellow surfer,
take these guidelines with you when developing revolutionary elvi:
@@ -23,7 +23,7 @@ over
IF STATEMENTS:
Prefer
- if rage ;
+ if rage
then
surf
fi
@@ -33,6 +33,18 @@ over
surf
fi
+FUNCTIONS:
+Prefer
+ myfunction ()
+ {
+ body
+ }
+
+over
+ myfunction () {
+ body
+ }
+
INITIALISING VARIABLES WITH AN EMPTY STRING
The var="" syntax is preferred over var=.
--------------2.1.1--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/surfraw-devel/attachments/20141014/e3610648/attachment.sig>
More information about the Surfraw-devel
mailing list