getWarnings method
Everything configured correctly that still deserves a second look. Never fails the command; a doctor that always fails gets ignored.
Collected from EVERY section rather than from associations alone, which
is what it read at first and is a shape that loses a finding silently
every time a section learns to warn. It already had: checkWiring's "no
registerHandler( anywhere under lib/" never reached the summary, so a
project that could not route a single link printed
Dart Wiring: ⚠ Needs attention in the report body, All checks passed!
underneath it, and exited 0. Without --verbose the warning text appeared
nowhere at all.
Implementation
List<String> getWarnings() {
if (!checkConfigExists()) return const [];
final warnings = <String>[];
for (final MapEntry<String, dynamic> entry
in checkPlatformSetup().entries) {
final section = entry.value;
if (section is! Map<String, dynamic>) continue;
for (final warning in section['warnings'] as List? ?? const []) {
// Prefixed the way getMissingRequirements prefixes its own, so a
// reader can tell which half of the install a line is about.
warnings.add('[${entry.key}] $warning');
}
}
return warnings;
}