diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2014-10-11 21:39:56 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2014-10-11 21:39:56 +0200 |
commit | afd84ea4e728f96fec169efbd0a9bb11994cb2a1 (patch) | |
tree | 8a14484ef009cfc8f53e52663e3dcaeee5eb763f | |
parent | 1a2dc3152650bf0d61784d6f8e8f2507a0e3556b (diff) | |
download | xtools-afd84ea4e728f96fec169efbd0a9bb11994cb2a1.tar.gz xtools-afd84ea4e728f96fec169efbd0a9bb11994cb2a1.tar.xz xtools-afd84ea4e728f96fec169efbd0a9bb11994cb2a1.zip |
xlint: return 1 when warnings are found
-rwxr-xr-x | xlint | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xlint b/xlint index f4bffd7..01cfee7 100755 --- a/xlint +++ b/xlint @@ -4,7 +4,8 @@ scan() { local rx=$1 msg=$2 limit=${3:-1} grep -P -Hn -m$limit -e "$rx" "$template" | - sed "s/^\([^:]*:[^:]*:\)\(.*\)/\1 $msg/" + sed "s/^\([^:]*:[^:]*:\)\(.*\)/\1 $msg/" | + grep . && ret=1 } variables=$(echo -n "#.* @@ -78,6 +79,7 @@ version wrksrc xml_entries" | tr '\n' '|') +ret=0 for template; do scan 'short_desc=.*\."' "unwanted trailing dot in short_desc" scan 'short_desc=["'\''][a-z]' "short_desc should start uppercase" @@ -108,3 +110,4 @@ for template; do scan 'distfiles=.*ftp\.gnu\.org/(pub/)?gnu' 'use $GNU_SITE' scan 'distfiles=.*freedesktop\.org/software' 'use $FREEDESKTOP_SITE' done +exit $ret |