Files
grafana/scripts/ci-check-strict.sh
T
Torkel Ödegaard a7afab4b8a Typescript: Fixing typescript strict error, and separate check from publishing (#29679)
* Typescript: Fixing typescript string error, and seperate check from publishing

* now should pass
2020-12-08 12:56:37 +01:00

14 lines
376 B
Bash
Executable File

#!/bin/bash
set -e
echo -e "Collecting code stats (typescript errors & more)"
ERROR_COUNT_LIMIT=579
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