Mercurial > hg-stable
changeset 19873:b3de50b0c7aa
check-code: check that '>' is used for continued lines
Continued lines do not get the SALT mangling.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 03 Oct 2013 14:50:47 +0200 |
parents | 681f7b9213a4 |
children | 5836edcbdc2e |
files | contrib/check-code.py tests/test-walk.t |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Thu Oct 03 14:50:47 2013 +0200 +++ b/contrib/check-code.py Thu Oct 03 14:50:47 2013 +0200 @@ -120,7 +120,7 @@ (uprefix + r'.*\|\| echo.*(fail|error)', "explicit exit code checks unnecessary"), (uprefix + r'set -e', "don't use set -e"), - (uprefix + r'\s', "don't indent commands, use > for continued lines"), + (uprefix + r'(\s|fi\b|done\b)', "use > for continued lines"), (r'^ saved backup bundle to \$TESTTMP.*\.hg$', winglobmsg), (r'^ changeset .* references (corrupted|missing) \$TESTTMP/.*[^)]$', winglobmsg),
--- a/tests/test-walk.t Thu Oct 03 14:50:47 2013 +0200 +++ b/tests/test-walk.t Thu Oct 03 14:50:47 2013 +0200 @@ -3,11 +3,11 @@ $ mkdir -p beans $ for b in kidney navy turtle borlotti black pinto; do > echo $b > beans/$b - $ done + > done $ mkdir -p mammals/Procyonidae $ for m in cacomistle coatimundi raccoon; do > echo $m > mammals/Procyonidae/$m - $ done + > done $ echo skunk > mammals/skunk $ echo fennel > fennel $ echo fenugreek > fenugreek