Patchwork D2237: contrib: ban $RANDOM using check-code

login
register
mail settings
Submitter phabricator
Date Feb. 13, 2018, 11:27 p.m.
Message ID <252caf7ec606468edd3330db4088a309@localhost.localdomain>
Download mbox | patch
Permalink /patch/27860/
State Not Applicable
Headers show

Comments

phabricator - Feb. 13, 2018, 11:27 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc38e9248f531: contrib: ban $RANDOM using check-code (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2237?vs=5659&id=5666

REVISION DETAIL
  https://phab.mercurial-scm.org/D2237

AFFECTED FILES
  contrib/check-code.py

CHANGE DETAILS




To: durin42, #hg-reviewers, martinvonz
Cc: mercurial-devel

Patch

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
   [