11 lines
706 B
Bash
Executable file
11 lines
706 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Refuse forbidden artifacts: game data, saves, binaries, decompiler output markers.
|
|
set -e; cd "$(dirname "$0")/.."
|
|
bad=0
|
|
while IFS= read -r f; do
|
|
case "$f" in *.gob|*.sav|*.tga|*.dds|*.X|*.wav) echo "forbidden asset: $f"; bad=1;; esac
|
|
done < <(git ls-files)
|
|
if git grep -nE 'FUN_[0-9a-f]{8}|undefined[0-9]? \*|\bDAT_[0-9a-f]{8}\b|__thiscall +FUN_' -- ':!include/generated/*' ':!tools/clean_room_check.sh' >/dev/null 2>&1; then
|
|
echo "decompiler-style identifiers found outside include/generated/:"; git grep -nE 'FUN_[0-9a-f]{8}|\bDAT_[0-9a-f]{8}\b' -- ':!include/generated/*' ':!tools/clean_room_check.sh' | head; bad=1
|
|
fi
|
|
[ $bad -eq 0 ] && echo "clean-room check: OK"; exit $bad
|