changeset 28884:75309badb485

check-code: reject import urllib
author timeless <timeless@mozdev.org>
date Thu, 07 Apr 2016 00:34:07 +0000
parents 032c4c2f802a
children d7e7b3dd44c8
files contrib/check-code.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Wed Apr 06 23:22:12 2016 +0000
+++ b/contrib/check-code.py	Thu Apr 07 00:34:07 2016 +0000
@@ -316,6 +316,8 @@
     (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"),
     (r'\butil\.Abort\b', "directly use error.Abort"),
     (r'^import Queue', "don't use Queue, use util.queue + util.empty"),
+    (r'^import cStringIO', "don't use cStringIO.StringIO, use util.stringio"),
+    (r'^import urllib', "don't use urllib, use util.urlreq/util.urlerr"),
   ],
   # warnings
   [