# HG changeset patch # User Augie Fackler # Date 2018-02-13 23:00:59 # Node ID c38e9248f5312384c541c260d65c108101039317 # Parent 068f520754ca26efa637d7a84f9327cbb4121dd4 contrib: ban $RANDOM using check-code Differential Revision: https://phab.mercurial-scm.org/D2237 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 @@ testpats = [ (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 [