check-code: forbid platform.system()
authorJun Wu <quark@fb.com>
Wed, 11 Oct 2017 17:42:57 -0700
changeset 34642 a679aa582d8d
parent 34641 bb6544b1c56e
child 34643 f42dec9c976e
check-code: forbid platform.system() See the previous patches for the reason. Differential Revision: https://phab.mercurial-scm.org/D1021
contrib/check-code.py
--- a/contrib/check-code.py	Wed Oct 11 17:42:35 2017 -0700
+++ b/contrib/check-code.py	Wed Oct 11 17:42:57 2017 -0700
@@ -362,6 +362,7 @@
     (r'\.next\(\)', "don't use .next(), use next(...)"),
     (r'([a-z]*).revision\(\1\.node\(',
      "don't convert rev to node before passing to revision(nodeorrev)"),
+    (r'platform\.system\(\)', "don't use platform.system(), use pycompat"),
 
     # rules depending on implementation of repquote()
     (r' x+[xpqo%APM][\'"]\n\s+[\'"]x',