Private beta, by invitation. It may change without warning. While the beta lasts, some paid features are free. See pricing

trumlyspec GitHub
Try trumly

Conformance cases /

duplicate-link

Tests duplicate definitions and links.

Our implementation passes this case when its check --json output for the input below equals the expected output.

Input

nodes/a.md
---
id: a
type: t
links:
  - type: uses
    to: b
  - type: uses
    to: b
  - type: uses
    to: b
    key: k
  - type: uses
    to: b
    key: k
---
nodes/b.md
---
id: b
type: t
---

Expected output

0 ghosts · 0 load errors · 2 nodes · 0 results

expected.json
{
 "ghosts": [],
 "load_errors": [],
 "nodes": [
  {
   "body": "",
   "fields": {},
   "id": "a",
   "links": [
    {
     "to": "b",
     "type": "uses"
    },
    {
     "to": "b",
     "type": "uses"
    },
    {
     "key": "k",
     "to": "b",
     "type": "uses"
    },
    {
     "key": "k",
     "to": "b",
     "type": "uses"
    }
   ],
   "parent": null,
   "plane": null,
   "title": "a",
   "type": "t"
  },
  {
   "body": "",
   "fields": {},
   "id": "b",
   "links": [],
   "parent": null,
   "plane": null,
   "title": "b",
   "type": "t"
  }
 ],
 "results": [],
 "structure": {
  "errors": [
   {
    "kind": "duplicate_link",
    "node": "a",
    "ref": "uses->b"
   },
   {
    "kind": "duplicate_link",
    "node": "a",
    "ref": "uses->b#k"
   }
  ],
  "warnings": []
 }
}