contrib/check-code.py
changeset 12770 614f0d8724ab
parent 12743 4c4aeaab2339
child 12785 c7d23b4ca4ba
--- a/contrib/check-code.py	Wed Oct 20 10:07:38 2010 +0200
+++ b/contrib/check-code.py	Wed Oct 20 10:13:04 2010 +0200
@@ -110,6 +110,7 @@
     (r'.{85}', "line too long"),
     (r'.{81}', "warning: line over 80 characters"),
     (r'[^\n]\Z', "no trailing newline"),
+    (r'(\S\s+|^\s+)\n', "trailing whitespace"),
 #    (r'^\s+[^_ ][^_. ]+_[^_]+\s*=', "don't use underbars in identifiers"),
 #    (r'\w*[a-z][A-Z]\w*\s*=', "don't use camelcase in identifiers"),
     (r'^\s*(if|while|def|class|except|try)\s[^[]*:\s*[^\]#\s]+',