terminationHasErrors function
Whether every warning has severity == 'error' in the list (helper for the
native --exit-code gate).
Implementation
bool terminationHasErrors(List warnings) {
for (final w in warnings) {
if (w['severity'] == 'error') return true;
}
return false;
}