changeset 42876:4257c33e24b7

check-code: allow command substitution with $(command) Both `command` and $(command) are specified by POSIX. The latter nests better. I don't see why we shouldn't allow both (or only the latter). Differential Revision: https://phab.mercurial-scm.org/D6789
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 06 Sep 2019 23:26:30 -0700
parents 5ca351ba2478
children 5bb68fb72df2
files contrib/check-code.py
diffstat 1 files changed, 0 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Fri Jun 14 16:26:11 2019 +0100
+++ b/contrib/check-code.py	Fri Sep 06 23:26:30 2019 -0700
@@ -116,7 +116,6 @@
     (r'\bls\b.*-\w*R', "don't use 'ls -R', use 'find'"),
     (r'printf.*[^\\]\\([1-9]|0\d)', r"don't use 'printf \NNN', use Python"),
     (r'printf.*[^\\]\\x', "don't use printf \\x, use Python"),
-    (r'\$\(.*\)', "don't use $(expr), use `expr`"),
     (r'rm -rf \*', "don't use naked rm -rf, target a directory"),
     (r'\[[^\]]+==', '[ foo == bar ] is a bashism, use [ foo = bar ] instead'),
     (r'(^|\|\s*)grep (-\w\s+)*[^|]*[(|]\w',