From 71b70720c1f34d9a8cc50206b2a40f1d7d44dbeb Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 9 Nov 2015 13:30:26 +0100 Subject: xlint: function formatting rules. --- xlint | 4 ++++ 1 file changed, 4 insertions(+) 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 -- cgit 1.4.1