content.entities

Every name, changed path, issue ref or @mention the text cites must exist in a source or change set you declare.

Science officer: Fascinating claim. Source?

needs sources What to pass

Quick reference

Examples

content.entities.in

Fail when the section names an entity that a declared source file does not contain. On the document directive it reads all the document's prose; each name reports at the line where it first appears.

Names found in the crew list pass

contract.mdv.md
<!-- mdv: section content.entities.in=./crew.json -->
## Shift Handover
Mira Okoye hands the rover to Tomas Reyes at the Ashgate dock.
<!-- mdv: endsection -->
crew.json
["Mira Okoye", "Tomas Reyes", "Ashgate"]
document.md
## Shift Handover

Mira Okoye hands the rover to Tomas Reyes at the Ashgate dock.

✓ passes

A name missing from the crew list is flagged

contract.mdv.md
<!-- mdv: section content.entities.in=./crew.json -->
## Shift Handover
Mira Okoye hands the rover to Tomas Reyes at the Ashgate dock.
<!-- mdv: endsection -->
crew.json
["Mira Okoye", "Tomas Reyes", "Ashgate"]
document.md
## Shift Handover

Mira Okoye hands the rover to Tomas Reyes at the Ashgate dock.
Brenna Voss signs off the checklist.

✗ unknown-entity error · line 4

content.paths.in

Fail when the document names, anywhere, a path a declared source does not contain — grounds every changed-file claim against a supplied change set with content.paths.in=@change/paths.

Paths in the change set pass

contract.mdv.md
<!-- mdv: section content.paths.in=@change/paths -->
## Files Changed
<!-- mdv: endsection -->
changes.json
{"paths": [{"path": "src/lib/retry.ts", "status": "modified"}, {"path": "README.md", "status": "modified"}], "refs": []}
document.md
## Files Changed

Updated `src/lib/retry.ts` and `README.md`.

✓ passes

A file the change never touched is flagged

contract.mdv.md
<!-- mdv: section content.paths.in=@change/paths -->
## Files Changed
<!-- mdv: endsection -->
changes.json
{"paths": [{"path": "src/lib/retry.ts", "status": "modified"}, {"path": "README.md", "status": "modified"}], "refs": []}
document.md
## Files Changed

Updated `src/lib/retry.ts` and `README.md`.
Also rewrote `src/lib/backoff.ts`.

✗ not-in-change-set error · line 3

content.issues.in

Fail when the document names, anywhere, an issue/ticket ref a declared source does not contain — grounds every ref claim against a supplied change set with content.issues.in=@change/refs.

Refs the change recorded pass

contract.mdv.md
<!-- mdv: section content.issues.in=@change/refs -->
## Fixes
<!-- mdv: endsection -->
changes.json
{"paths": [], "refs": ["#123", "#145"]}
document.md
## Fixes

Resolves #123 and #145.

✓ passes

An issue the change never referenced is flagged

contract.mdv.md
<!-- mdv: section content.issues.in=@change/refs -->
## Fixes
<!-- mdv: endsection -->
changes.json
{"paths": [], "refs": ["#123", "#145"]}
document.md
## Fixes

Resolves #123 and #999.

✗ not-in-change-set error · line 3

content.mentions.mask

The shape of a checked mention (a quoted mask; the whole match is the mention). Carrier for content.mentions.in, which performs the membership scan.

content.mentions.in

Check every mention matching the sibling content.mentions.mask against this source: an unknown mention reports once, at its first occurrence, with a did-you-mean suggestion.

Captain and ensign names on the roster pass

contract.mdv.md
<!-- mdv: document content.mentions.mask="<word|oneOf: [Captain,Ensign]> <name>" content.mentions.in=./roster.json -->
roster.json
["Captain Reyes", "Ensign Okafor"]
document.md
Captain Reyes ordered the relay check.

Ensign Okafor logged the result.

✓ passes

A misspelt crew name is flagged with a suggestion

contract.mdv.md
<!-- mdv: document content.mentions.mask="<word|oneOf: [Captain,Ensign]> <name>" content.mentions.in=./roster.json -->
roster.json
["Captain Reyes", "Ensign Okafor"]
document.md
Captain Reyes ordered the relay check.

Ensign Okafro logged the result.

✗ unknown-entity error · line 3

See also: Grounded templates

On this page