Skip to content

Commit

Permalink
Improve grep to catch globals that start with any of the exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
pintsized committed Jul 22, 2015
1 parent ccab2b2 commit 24138e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/lua-releng
Expand Up @@ -40,7 +40,7 @@ for my $file (map glob, qw{ *.lua lib/*.lua lib/*/*.lua lib/*/*/*.lua lib/*/*/*/
close $in;

print "Checking use of Lua global variables in file $file ...\n";
system("luac -p -l $file | grep ETGLOBAL | grep -vE 'require|type|tostring|error|ngx|ndk|jit|setmetatable|getmetatable|string|table|io|os|print|tonumber|math|pcall|xpcall|unpack|pairs|ipairs|assert|module|package|coroutine|[gs]etfenv|next|select|rawset|rawget|debug'");
system("luac -p -l $file | grep ETGLOBAL | grep -vE '(require|type|tostring|error|ngx|ndk|jit|setmetatable|getmetatable|string|table|io|os|print|tonumber|math|pcall|xpcall|unpack|pairs|ipairs|assert|module|package|coroutine|[gs]etfenv|next|select|rawset|rawget|debug)\$'");
#file_contains($file, "attempt to write to undeclared variable");
system("grep -H -n -E --color '.{120}' $file");
}
Expand Down

0 comments on commit 24138e0

Please sign in to comment.