grafana/scripts/ci-check-strict.sh
Ivana Huckova d5956ce4b7
Loki: Fix error handling, remove legacy condition (#38633)
* Fix error handling, remove legacy condition

* Fix strict errors in Loki and lower error count

* Update
2021-09-06 15:28:54 +02:00

14 lines
375 B
Bash
Executable File

#!/bin/bash
set -e
echo -e "Collecting code stats (typescript errors & more)"
ERROR_COUNT_LIMIT=47
ERROR_COUNT="$(./node_modules/.bin/tsc --project tsconfig.json --noEmit --strict true | grep -oP 'Found \K(\d+)')"
if [ "$ERROR_COUNT" -gt $ERROR_COUNT_LIMIT ]; then
echo -e "Typescript strict errors $ERROR_COUNT exceeded $ERROR_COUNT_LIMIT so failing build"
exit 1
fi