checkStructure method

List<SmfIssue> checkStructure(
  1. ContractResult result, {
  2. required Map<String, String> files,
  3. required Map<String, ContributionOrigin> owners,
})

Indexes the Dart files among files, the text files of the rendered app of result by path, runs the structural rules of its present roles with the data it collected, the steps by hand that stage 5 planned with their link (see ContractResult.manualSteps and ContractResult.setupLink) and the texts, and checks the symbols of their interfaces: those that the app needs, by the choices of its roles, are declared, and the app has no file of one that it does not need (see RoleInterface.checkSymbols).

owners names who generated each file; the rules of the roles check only files with an owner.

Throws an ArgumentError if the case of result did not resolve, and a StateError if the harness did not render its app, so that its roles made no choice, while a present role has a symbol with a condition of a role that the app has: whether the app needs the symbol cannot be told. A condition of a role that the app lacks holds or fails without a choice, so its symbol is checked as before.

Implementation

List<SmfIssue> checkStructure(
  ContractResult result, {
  required Map<String, String> files,
  required Map<String, ContributionOrigin> owners,
}) {
  final (:indexes, :issues) = _index(files, owners);
  return [...issues, ..._structureIssues(result, indexes, files, owners)];
}