D2237: contrib: ban $RANDOM using check-code
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Tue Feb 13 23:03:05 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D2237
AFFECTED FILES
contrib/check-code.py
CHANGE DETAILS
diff --git a/contrib/check-code.py b/contrib/check-code.py
--- a/contrib/check-code.py
+++ b/contrib/check-code.py
@@ -150,6 +150,7 @@
(r'grep.* -[ABC]', "don't use grep's context flags"),
(r'find.*-printf',
"don't use 'find -printf', it doesn't exist on BSD find(1)"),
+ (r'\$RANDOM ', "don't use bash-only $RANDOM to generate random values"),
],
# warnings
[
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list