Mercurial > hg
changeset 47499:9b1710c50230
check-code: stop forbidding return code result
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.
Differential Revision: https://phab.mercurial-scm.org/D10994
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 06 Jul 2021 12:42:32 +0200 |
parents | 9d929f9cb9b4 |
children | 23f5ed6dbcb1 |
files | contrib/check-code.py |
diffstat | 1 files changed, 0 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Fri Jul 02 22:58:04 2021 +0200 +++ b/contrib/check-code.py Tue Jul 06 12:42:32 2021 +0200 @@ -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",