From b1381ce528c30112f87da209d0741ec02ebd38ec Mon Sep 17 00:00:00 2001 From: spookydonut Date: Sat, 28 Sep 2019 01:27:39 +0800 Subject: [PATCH] add extra grep checks (#46632) * add extra grep checks * 2manyerrors * eol is clean --- tools/travis/check_grep.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/travis/check_grep.sh b/tools/travis/check_grep.sh index 2117b570eb4..c2811212e6c 100755 --- a/tools/travis/check_grep.sh +++ b/tools/travis/check_grep.sh @@ -37,6 +37,13 @@ if grep '^/*var/' code/**/*.dm; then echo "Unmanaged global var use detected in code, please use the helpers." st=1 fi; +if grep '(^(?!(.*\n)).*$)' code/**/*.dm; then + echo "No newline at end of file detected" + st=1 +fi; +if grep -P '^/[\w/]\S+\(.*(var/|, ?var/.*).*\)' code/**/*.dm; then + echo "changed files contains proc argument starting with 'var'" +fi; if grep -i 'centcomm' code/**/*.dm; then echo "Misspelling(s) of CENTCOM detected in code, please remove the extra M(s)." st=1