contrib: add check-code rule banning use of readlink
authorAugie Fackler <augie@google.com>
Wed, 11 Oct 2017 03:48:11 -0700
changeset 34573 3e4b7861c1c5
parent 34572 d6d10771950c
child 34574 05c2a9f37a1d
contrib: add check-code rule banning use of readlink readlink doesn't always exist, such as on Solaris-derived platforms. Differential Revision: https://phab.mercurial-scm.org/D1000
contrib/check-code.py
--- a/contrib/check-code.py	Tue Oct 10 11:03:14 2017 -0400
+++ b/contrib/check-code.py	Wed Oct 11 03:48:11 2017 -0700
@@ -203,6 +203,7 @@
      'use test -f to test for file existence'),
     (r'^  diff -[^ -]*p',
      "don't use (external) diff with -p for portability"),
+    (r' readlink ', 'use readlink.py instead of readlink'),
     (r'^  [-+][-+][-+] .* [-+]0000 \(glob\)',
      "glob timezone field in diff output for portability"),
     (r'^  @@ -[0-9]+ [+][0-9]+,[0-9]+ @@',