contrib/check-code.py
changeset 10451 63a9bfad50ff
parent 10412 5326800d6937
child 10658 95c7c4b7e67a
--- a/contrib/check-code.py	Sun Feb 14 00:46:13 2010 +0200
+++ b/contrib/check-code.py	Sat Feb 13 23:20:17 2010 -0600
@@ -10,7 +10,8 @@
 import sys, re, glob
 
 def repquote(m):
-    t = re.sub(r"\S", "x", m.group(2))
+    t = re.sub(r"\w", "x", m.group(2))
+    t = re.sub(r"[^\sx]", "o", t)
     return m.group(1) + t + m.group(1)
 
 def repcomment(m):
@@ -88,6 +89,8 @@
     (r'[^>< ](\+=|-=|!=|<>|<=|>=|<<=|>>=)\s', "missing whitespace around operator"),
     (r'\s(\+=|-=|!=|<>|<=|>=|<<=|>>=)\S', "missing whitespace around operator"),
     (r'[^+=*!<>&| -](\s=|=\s)[^= ]', "wrong whitespace around ="),
+    (r'raise Exception', "don't raise generic exceptions"),
+    (r'ui\.(status|progress|write|note)\([\'\"]x', "unwrapped ui message"),
 ]
 
 pyfilters = [