Mercurial > hg
comparison contrib/check-code.py @ 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 | d4ba4d51f85f |
children | 752109dc2fb7 |
comparison
equal
deleted
inserted
replaced
47498:9d929f9cb9b4 | 47499:9b1710c50230 |
---|---|
213 ( | 213 ( |
214 uprefix + r'.*\|\s*sed[^|>\n]*\n', | 214 uprefix + r'.*\|\s*sed[^|>\n]*\n', |
215 "use regex test output patterns instead of sed", | 215 "use regex test output patterns instead of sed", |
216 ), | 216 ), |
217 (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"), | 217 (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"), |
218 (uprefix + r'.*(?<!\[)\$\?', "explicit exit code checks unnecessary"), | |
219 ( | 218 ( |
220 uprefix + r'.*\|\| echo.*(fail|error)', | 219 uprefix + r'.*\|\| echo.*(fail|error)', |
221 "explicit exit code checks unnecessary", | 220 "explicit exit code checks unnecessary", |
222 ), | 221 ), |
223 (uprefix + r'set -e', "don't use set -e"), | 222 (uprefix + r'set -e', "don't use set -e"), |