grafana/scripts/ci-check-strict.sh
Hugo Häggmark c8b59b79c3
Chore: Fix strict errors, down to 340 (#32109)
* Chore: reduces misc reducerTester strict issues

* Chore: fixes various strict errors in reducer tests for ElasticSearch

* Chore: lowers errors in AzureMonitor DataSource tests
2021-03-19 13:10:03 +01:00

14 lines
376 B
Bash
Executable File

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