summary refs log tree commit diff
path: root/xlint
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-11-09 13:30:26 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2015-11-09 13:30:26 +0100
commit71b70720c1f34d9a8cc50206b2a40f1d7d44dbeb (patch)
tree4cb5cd26567eceea72aee35521ad59aa31ea838a /xlint
parentbc014fd8c84585b7cc9f9f264c0b1f7d05974eff (diff)
downloadxtools-71b70720c1f34d9a8cc50206b2a40f1d7d44dbeb.tar.gz
xtools-71b70720c1f34d9a8cc50206b2a40f1d7d44dbeb.tar.xz
xtools-71b70720c1f34d9a8cc50206b2a40f1d7d44dbeb.zip
xlint: function formatting rules. v0.30
Diffstat (limited to 'xlint')
-rwxr-xr-xxlint4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlint b/xlint
index 712cb5e..484002f 100755
--- a/xlint
+++ b/xlint
@@ -169,6 +169,10 @@ for template; do
 	scan 'distfiles=.*ftp\.gnu\.org/(pub/)?gnu' 'use $GNU_SITE'
 	scan 'distfiles=.*freedesktop\.org/software' 'use $FREEDESKTOP_SITE'
 	scan '^wrksrc=(\$\{[^}]+\}|[^${}/])*/.+' 'wrksrc should be a top-level directory'
+	scan '^\t*function\b' 'do not use the function keyword'
+	scan '^\t*[^ ]*  *\(\)' 'do not use space before function parenthesis'
+	scan '^\t*[^ ]*\(\)(|   *){' 'use one space after function parenthesis'
+	scan '^\t*[^ ]*\(\)$' 'do not use a newline before function opening brace'
 	else
 	echo no such template "$template" 1>&2
 	fi | sort -t: -n -k2 | grep . && ret=1