diff contrib/check-code.py @ 16496:abbabbbe4ec2 stable

tests: use 'do sleep 0' instead of 'do true', also on first line of command f64b25f147d7 established that '... do true ...' shouldn't be used, but that was only enforced on continued lines.
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 23 Apr 2012 01:56:48 +0200
parents 5f9835ed3d6d
children c326fe884daa
line wrap: on
line diff
--- a/contrib/check-code.py	Mon Apr 23 01:56:48 2012 +0200
+++ b/contrib/check-code.py	Mon Apr 23 01:56:48 2012 +0200
@@ -75,6 +75,7 @@
     (r'^alias\b.*=', "don't use alias, use a function"),
     (r'if\s*!', "don't use '!' to negate exit status"),
     (r'/dev/u?random', "don't use entropy, use /dev/zero"),
+    (r'do\s*true;\s*done', "don't use true as loop body, use sleep 0"),
   ],
   # warnings
   []
@@ -98,8 +99,6 @@
     (uprefix + r'set -e', "don't use set -e"),
     (uprefix + r'\s', "don't indent commands, use > for continued lines"),
     (uprefixc + r'( *)\t', "don't use tabs to indent"),
-    (uprefixc + r'.*do\s*true;\s*done',
-     "don't use true as loop body, use sleep 0"),
   ],
   # warnings
   []