{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "core/aggregators/catalog.aggregator.ts",
          "name": "tallyBy",
          "source": {
            "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-catalog-aggregator-ts",
            "json": "https://banes-lab.com/json/source/quality/core/aggregators/catalog.aggregator.ts",
            "label": "core/aggregators/catalog.aggregator.ts",
            "markdown": "https://banes-lab.com/source/quality/core/aggregators/catalog.aggregator.ts.md",
            "ref": "anatomy:file-quality-core-aggregators-catalog-aggregator-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 40,
      "name": "produce",
      "signature": "const produce = async function produce(): Promise<CatalogProduct[]> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 8,
      "name": "TOOL",
      "signature": "const TOOL = \"clang-tidy\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 9,
      "name": "VERSION",
      "signature": "const VERSION = \"llvm-main\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "SOURCE",
      "signature": "const SOURCE ="
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 12,
      "name": "DOCS",
      "signature": "const DOCS = \"https://clang.llvm.org/extra/clang-tidy/checks\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 13,
      "name": "DOC",
      "signature": "const DOC = \":doc:`\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 14,
      "name": "LT",
      "signature": "const LT = \" <\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "parseLine",
      "signature": "const parseLine = function parseLine(line: string): CatalogRule | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 17,
      "name": "at",
      "signature": "const at = line.indexOf(DOC);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "lt",
      "signature": "const lt = at === -1 ? -1 : line.indexOf(LT, at + DOC.length);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 19,
      "name": "name",
      "signature": "const name = lt === -1 ? \"\" : line.slice(at + DOC.length, lt).trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 23,
      "name": "pathStart",
      "signature": "const pathStart = lt + LT.length;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 24,
      "name": "pathEnd",
      "signature": "const pathEnd = line.indexOf(\">\", pathStart);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 25,
      "name": "docPath",
      "signature": "const docPath = pathEnd > pathStart ? line.slice(pathStart, pathEnd) : name;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 41,
      "name": "parsed",
      "signature": "const parsed = ((await remoteText(SOURCE)) ?? \"\").split(\"\\n\").map(parseLine);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 42,
      "name": "rules",
      "signature": "const rules = distinctRules(parsed.filter((rule): rule is CatalogRule => rule !== null)).toSorted(byRuleId);"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-clang-tidy-producer-ts",
  "language": "typescript",
  "layer": "application",
  "name": "tool.clang-tidy.producer.ts",
  "path": "core/producers/tool.clang-tidy.producer.ts",
  "ref": "anatomy:file-quality-core-producers-tool-clang-tidy-producer-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#folder-quality-core-producers",
          "json": "https://banes-lab.com/json/anatomy/quality/folder-quality-core-producers",
          "label": "core/producers",
          "markdown": "https://banes-lab.com/anatomy/quality/folder-quality-core-producers.md",
          "ref": "chapter:/anatomy/quality#folder-quality-core-producers"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#file-quality-core-aggregators-catalog-aggregator-ts",
          "json": "https://banes-lab.com/json/source/quality/core/aggregators/catalog.aggregator.ts",
          "label": "core/aggregators/catalog.aggregator.ts",
          "markdown": "https://banes-lab.com/source/quality/core/aggregators/catalog.aggregator.ts.md",
          "ref": "anatomy:file-quality-core-aggregators-catalog-aggregator-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#folder-quality-core-aggregators",
          "json": "https://banes-lab.com/json/anatomy/quality/folder-quality-core-aggregators",
          "label": "core/aggregators",
          "markdown": "https://banes-lab.com/anatomy/quality/folder-quality-core-aggregators.md",
          "ref": "chapter:/anatomy/quality#folder-quality-core-aggregators"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "producer",
    "subject": "tool",
    "variant": "clang-tidy"
  },
  "stats": {
    "bytes": 2034,
    "callable": 2,
    "definitions": 16,
    "edges": 1,
    "exported": 0,
    "files": 1,
    "findings": {},
    "flows": {
      "entry": 1,
      "isolated": 15
    },
    "lines": {
      "blank": 4,
      "code": 48,
      "total": 52
    }
  },
  "summary": "48 lines of code and 16 definitions.",
  "text": "https://banes-lab.com/source/quality/core/producers/tool.clang-tidy.producer.ts.txt",
  "tree": "quality",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-clippy-producer-ts",
      "json": "https://banes-lab.com/json/source/quality/core/producers/tool.clippy.producer.ts",
      "label": "core/producers/tool.clippy.producer.ts",
      "markdown": "https://banes-lab.com/source/quality/core/producers/tool.clippy.producer.ts.md",
      "ref": "anatomy:file-quality-core-producers-tool-clippy-producer-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-bandit-producer-ts",
      "json": "https://banes-lab.com/json/source/quality/core/producers/tool.bandit.producer.ts",
      "label": "core/producers/tool.bandit.producer.ts",
      "markdown": "https://banes-lab.com/source/quality/core/producers/tool.bandit.producer.ts.md",
      "ref": "anatomy:file-quality-core-producers-tool-bandit-producer-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/quality/core/producers",
    "label": "core/producers",
    "markdown": "https://banes-lab.com/api/source/quality/core/producers.md",
    "ref": "api:source/quality/core/producers"
  }
}
