Files
azerothcore-wotlk/.github/workflows/check_pending_sql.yml
Patrick Lewis cfc5cf3d83 fix(ci): update semicolon check #3799
add sed to filter out comments with --
2020-11-28 18:42:20 -06:00

28 lines
741 B
YAML

name: Check pending sql for Procedure/Function
on:
pull_request:
jobs:
check-pending-sql:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Check for Procedure/Function
run: |
if grep -R -q -i -E "(PROCEDURE|FUNCTION)" data/sql/updates/pending*
then
exit 1
else
exit 0
fi
- name: Semicolon check
run: |
for i in `find data/sql/updates/pending* -name "*.sql" -type f`; do
if [[ $(cat "$i"|sed 's/ --.*$//'|tr -d '\n'|tail -c 1) != ";" ]]; then
echo "Missing Semicolon at the end of the file. (;)"
exit 1
else
exit 0
fi
done