[PATCH] check-code: add check for 'source'

Yuya Nishihara yuya at tcha.org
Fri May 21 08:55:26 CDT 2010


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1274450037 -32400
# Node ID cd968753374e220860230d185ad895831043827b
# Parent  3d621cdf1808c1a8d6dbe0c627eef9f5f69d2a17
check-code: add check for 'source'

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -61,6 +61,7 @@ testpats = [
     (r'[^\n]\Z', "no trailing newline"),
     (r'export.*=', "don't export and assign at once"),
     ('^([^"\']|("[^"]*")|(\'[^\']*\'))*\\^', "^ must be quoted"),
+    (r'^source\b', "don't use 'source', use '.'"),
 ]
 
 testfilters = [


More information about the Mercurial-devel mailing list