Patchwork D10994: check-code: stop forbidding return code result

login
register
mail settings
Submitter phabricator
Date July 6, 2021, 11:13 a.m.
Message ID <differential-rev-PHID-DREV-aqbro7hraflj3tlh7maj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49308/
State Superseded
Headers show

Comments

phabricator - July 6, 2021, 11:13 a.m.
marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  There is no explication of what is the intend of that check and what is the
  alternative.
  
  I suspect this comes from the transition to the "unified test" format circa
  
  2010. With the non zero return explicitly listed in the output explicit $?
  
  checking became Redundant. However there is valid use case for checking $? so I
  am dropping this check.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -215,7 +215,6 @@ 
             "use regex test output patterns instead of sed",
         ),
         (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"),
-        (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"),
         (
             uprefix + r'.*\|\| echo.*(fail|error)',
             "explicit exit code checks unnecessary",