doctorExitCode function
The exit code for checks: 1 when one found a problem, or a note when
strict, otherwise 0.
Implementation
int doctorExitCode(List<DoctorCheck> checks, {bool strict = false}) =>
checks.any(
(DoctorCheck check) =>
check.status == DoctorStatus.problem ||
(strict && check.status == DoctorStatus.note),
)
? 1
: 0;