changeset 11764:16723af520b0

check-code: added a check for calls to the builtin cmp function
author Renato Cunha <renatoc@gmail.com>
date Sat, 07 Aug 2010 16:13:53 -0300
parents 69e0bcf36961
children a65ea28269ef
files contrib/check-code.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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"),