checkTemplateTags function
List<SmfIssue>
checkTemplateTags({
- required ModuleRegistry registry,
- required Resolution resolution,
- required Collection collection,
Checks the tags of the sockets in the bricks among collection's
contributions that apply:
- every tag is
{{{smf_…}}}with a valid name, outside mustache sections, and names a socket that its brick's owner may hold: the template or a provider of the socket's role, a module whose roles include the role of a family member, the module that owns a socket of a module, or anyone for a socket of the pipeline; - every template that mason renders is valid mustache; no variable, a
tag or not, comes right after a
{, no template changes the mustache delimiters or includes a partial, and the path of every file uses no mustache but variables; - a presence flag,
has_<role>, is of a role that the brick's owner provides, requires or uses, or of a role open to all modules: the pipeline sets no other; - a brick with conditions on what roles chose
(
Contribution.whenChosen) holds no tag of a socket, since an app where they do not hold leaves it out with what the socket gets; - only the tag of a socket for one value, such as a minimum version, may
appear several times; a socket whose contributions carry imports has
its tag in a Dart file, and a socket of the pipeline at the start of a
line of
pubspec.yaml; - the templates hold every tag of a socket with several or none of them:
both tags of a wrapper, in the same file, the opening one first, and
the tag of each place of a socket for one value at several places
(
ValueSocket.places).
Stage 5 runs it; the contract harness adds missingTemplateTags.
Implementation
List<SmfIssue> checkTemplateTags({
required ModuleRegistry registry,
required Resolution resolution,
required Collection collection,
}) =>
scanBricks(
registry: registry,
resolution: resolution,
collection: collection,
).issues;