check-code: promote 80+ character line warning to an error
authorBrodie Rao <brodie@sf.io>
Sun, 13 May 2012 13:17:27 +0200
changeset 16702 1751d96d324f
parent 16701 34c30506dd4e
child 16703 7292a4618f46
check-code: promote 80+ character line warning to an error
contrib/check-code.py
--- a/contrib/check-code.py	Sun May 13 13:19:46 2012 +0200
+++ b/contrib/check-code.py	Sun May 13 13:17:27 2012 +0200
@@ -135,7 +135,7 @@
     (r'^\s+\w+=\w+[^,)\n]$', "missing whitespace in assignment"),
     (r'(\s+)try:\n((?:\n|\1\s.*\n)+?)\1except.*?:\n'
      r'((?:\n|\1\s.*\n)+?)\1finally:', 'no try/except/finally in Py2.4'),
-    (r'.{85}', "line too long"),
+    (r'.{81}', "line too long"),
     (r' x+[xo][\'"]\n\s+[\'"]x', 'string join across lines with no space'),
     (r'[^\n]\Z', "no trailing newline"),
     (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
@@ -206,7 +206,6 @@
   ],
   # warnings
   [
-    (r'.{81}', "warning: line over 80 characters"),
     (r'^\s*except:$', "warning: naked except clause"),
     (r'ui\.(status|progress|write|note|warn)\([\'\"]x',
      "warning: unwrapped ui message"),
@@ -226,7 +225,7 @@
     (r'^  ', "don't use spaces to indent"),
     (r'\S\t', "don't use tabs except for indent"),
     (r'(\S[ \t]+|^[ \t]+)\n', "trailing whitespace"),
-    (r'.{85}', "line too long"),
+    (r'.{81}', "line too long"),
     (r'(while|if|do|for)\(', "use space after while/if/do/for"),
     (r'return\(', "return is not a function"),
     (r' ;', "no space before ;"),