checkDataSafetyFile function
Reads the CSV at path and reports everything structurally wrong with it.
Returns problems rather than throwing, and returns all of them, for the same reason checkAppStoreTree does: told about them one at a time, the second is found only after the first is fixed and pushed.
Implementation
List<ReleaseProblem> checkDataSafetyFile(String path) {
final file = File(path);
if (!file.existsSync()) {
return [ReleaseProblem(path, 'no such file')];
}
return checkDataSafety(file.readAsStringSync(), where: path);
}