unmatchedGroups function
The groups that no project in projectPaths belongs to, in the order
given and each once.
Implementation
List<String> unmatchedGroups(
Iterable<String> projectPaths,
List<String> groups,
String executionRoot,
) {
final seen = <String>{
for (final path in projectPaths) ...projectGroupsOf(path, executionRoot),
};
final unmatched = <String>[];
for (final group in groups) {
if (!seen.contains(group) && !unmatched.contains(group)) {
unmatched.add(group);
}
}
return unmatched;
}