Commit 11c684bf authored by Michael Hanselmann's avatar Michael Hanselmann

Disallow "xrange" function

Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent f1501b3f
......@@ -31,6 +31,12 @@ for script; do
echo "Found end-of-line-whitespace in $script" >&2
fi
# FIXME: This will also match "foo.xrange(...)"
if grep -n -H -E '^[^#]*\<xrange\>' "$script"; then
let ++problems
echo "Forbidden function 'xrange' used in $script" >&2
fi
if [[ "$(wc --max-line-length < "$script")" -gt 80 ]]; then
let ++problems
echo "Longest line in $script is longer than 80 characters" >&2
......
......@@ -31,7 +31,7 @@ variable-rgx = (_?([a-z_][a-z0-9_]*)|([A-Z0-9_]+))$
inlinevar-rgx = [A-Za-z_][A-Za-z0-9_]*$
good-names = i,j,k,_
bad-names = foo,bar,baz,toto,tutu,tata
bad-functions =
bad-functions = xrange
[TYPECHECK]
ignore-mixin-members = yes
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment