names-qualified-unknown
Tests one part of the structure checks.
Our implementation passes this case when its check --json output for the input below equals the expected
output.
Input
nodes/bare.md---
id: bare
type: thing
---nodes/qualified.md---
id: qualified
type: x:thing
---nodes/thing-rule.md---
id: thing-rule
type: rule
fields: {"applies_to": {"type": "x:thing"}, "check": {"require_fields": ["owner"]}, "severity": "warn"}
---Expected output
0 ghosts · 0 load errors · 3 nodes · 1 results
expected.json{
"ghosts": [],
"load_errors": [],
"nodes": [
{
"body": "",
"fields": {},
"id": "bare",
"links": [],
"parent": null,
"plane": null,
"title": "bare",
"type": "thing"
},
{
"body": "",
"fields": {},
"id": "qualified",
"links": [],
"parent": null,
"plane": null,
"title": "qualified",
"type": "x:thing"
},
{
"body": "",
"fields": {
"applies_to": {
"type": "x:thing"
},
"check": {
"require_fields": [
"owner"
]
},
"severity": "warn"
},
"id": "thing-rule",
"links": [],
"parent": null,
"plane": null,
"title": "thing-rule",
"type": "rule"
}
],
"results": [
{
"node": "qualified",
"rule": "thing-rule",
"severity": "warn",
"status": "fail"
}
],
"structure": {
"errors": [],
"warnings": []
}
}