Forgot to specify files to check in check grep (#72277)

This commit is contained in:
Zephyr
2023-01-04 05:43:58 +00:00
committed by GitHub
parent 09cdc742e0
commit aa10d9d756
+4 -3
View File
@@ -97,10 +97,11 @@ if $grep '^\t+ [^ *]' $code_files; then
fi;
section "unit tests"
unit_test_files="code/modules/unit_tests/**/**.dm"
part "mob/living/carbon/human usage"
if $grep 'allocate\(/mob/living/carbon/human[,\)]' code/modules/unit_tests/**/**.dm ||
$grep 'new /mob/living/carbon/human\s?\(' ||
$grep 'var/mob/living/carbon/human/\w+\s?=\s?new' ; then
if $grep 'allocate\(/mob/living/carbon/human[,\)]' $unit_test_files ||
$grep 'new /mob/living/carbon/human\s?\(' $unit_test_files ||
$grep 'var/mob/living/carbon/human/\w+\s?=\s?new' $unit_test_files ; then
echo
echo -e "${RED}ERROR: Usage of mob/living/carbon/human detected in a unit test, please use mob/living/carbon/human/consistent.${NC}"
st=1