check-code: added a check for calls to the builtin cmp function
authorRenato Cunha <renatoc@gmail.com>
Sat, 07 Aug 2010 16:13:53 -0300
changeset 11764 16723af520b0
parent 11763 69e0bcf36961
child 11766 a65ea28269ef
check-code: added a check for calls to the builtin cmp function
contrib/check-code.py
--- a/contrib/check-code.py	Sat Aug 07 16:12:51 2010 -0300
+++ b/contrib/check-code.py	Sat Aug 07 16:13:53 2010 -0300
@@ -74,6 +74,7 @@
      "tuple parameter unpacking not available in Python 3+"),
     (r'lambda\s*\(.*,.*\)',
      "tuple parameter unpacking not available in Python 3+"),
+    (r'(?<!def)\s+(cmp)\(', "cmp is not available in Python 3+"),
     (r'\breduce\s*\(.*', "reduce is not available in Python 3+"),
     (r'\.has_key\b', "dict.has_key is not available in Python 3+"),
     (r'^\s*\t', "don't use tabs"),