Mercurial > hg
changeset 26588:b3f7516fa50e
check-code: detect and ban 'util.Abort'
We have seen the light, please use the new way.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 08 Oct 2015 12:53:09 -0700 |
parents | 56b2bcea2529 |
children | fb388aa26453 |
files | contrib/check-code.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Thu Oct 08 12:55:45 2015 -0700 +++ b/contrib/check-code.py Thu Oct 08 12:53:09 2015 -0700 @@ -123,7 +123,8 @@ (r'sed (-e )?\'(\d+|/[^/]*/)i(?!\\\n)', "put a backslash-escaped newline after sed 'i' command"), (r'^diff *-\w*u.*$\n(^ \$ |^$)', "prefix diff -u with cmp"), - (r'seq ', "don't use 'seq', use $TESTDIR/seq.py") + (r'seq ', "don't use 'seq', use $TESTDIR/seq.py"), + (r'\butil\.Abort\b', "directly use error.Abort"), ], # warnings [ @@ -293,6 +294,7 @@ (r'\s0[0-7]+\b', 'legacy octal syntax; use "0o" prefix instead of "0"'), # XXX only catch mutable arguments on the first line of the definition (r'def.*[( ]\w+=\{\}', "don't use mutable default arguments"), + (r'\butil\.Abort\b', "directly use error.Abort"), ], # warnings [