Patchwork D1021: check-code: forbid platform.system()

login
register
mail settings
Submitter phabricator
Date Oct. 12, 2017, 12:57 a.m.
Message ID <differential-rev-PHID-DREV-u3ydy5bk652ttifyt2g2-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/24765/
State Superseded
Headers show

Comments

phabricator - Oct. 12, 2017, 12:57 a.m.
quark created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  See the previous patches for the reason.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1021

AFFECTED FILES
  contrib/check-code.py

CHANGE DETAILS




To: quark, #hg-reviewers
Cc: mercurial-devel
phabricator - Oct. 12, 2017, 9:08 a.m.
lothiraldan accepted this revision.
lothiraldan added a comment.


  LGTM but I can't validate the Mac OS and Windows tests.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1021

To: quark, #hg-reviewers, lothiraldan
Cc: lothiraldan, mercurial-devel
phabricator - Oct. 12, 2017, 2:57 p.m.
ryanmce added a comment.


  +1 to this change, happy to land this once my comments on the series are addressed

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1021

To: quark, #hg-reviewers, lothiraldan
Cc: ryanmce, lothiraldan, mercurial-devel

Patch

diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -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',