Patchwork D11450: check-code: make it possible to ignore the PWD check in some situation

login
register
mail settings
Submitter phabricator
Date Sept. 17, 2021, 7:05 p.m.
Message ID <differential-rev-PHID-DREV-rxbwlpghywbtueugbur2-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49766/
State Superseded
Headers show

Comments

phabricator - Sept. 17, 2021, 7:05 p.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  The check-code script does not motivate the banning of $PWD so I am not sure
  what it is about. And I will needs to use the env variable in the next tests. So
  I am adding a way to make an exception.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

AFFECTED FILES
  contrib/check-code.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, 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
@@ -195,7 +195,7 @@ 
     [
         (r'^function', "don't use 'function', use old style"),
         (r'^diff.*-\w*N', "don't use 'diff -N'"),
-        (r'\$PWD|\${PWD}', "don't use $PWD, use `pwd`"),
+        (r'\$PWD|\${PWD}', "don't use $PWD, use `pwd`", "no-pwd-check"),
         (r'^([^"\'\n]|("[^"\n]*")|(\'[^\'\n]*\'))*\^', "^ must be quoted"),
         (r'kill (`|\$\()', "don't use kill, use killdaemons.py"),
     ],