Add workflow to check for warnOnImplicitThis

This commit is contained in:
Kasper Svendsen 2023-06-26 12:11:50 +02:00
Родитель 579c56c744
Коммит b4ef243733
1 изменённых файлов: 22 добавлений и 0 удалений

22
.github/workflows/check-implicit-this.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,22 @@
name: "Check implicit this warnings"
on: workflow_dispatch
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check that implicit this warnings is enabled for all packs
shell: bash
run: |
EXIT_CODE=0
packs="$(find . -iname 'qlpack.yml')"
for pack_file in ${packs}; do
option="$(yq '.warnOnImplicitThis' ${pack_file})"
if [ "${option}" != "true" ]; then
echo "warnOnImplicitThis property must be set to 'true' for pack ${pack_file}"
EXIT_CODE=1
fi
done
exit "${EXIT_CODE}"