{
  "definitions": [
    {
      "callable": true,
      "callees": [],
      "callers": [
        {
          "file": "core/converters/violation.converter.ts",
          "name": "findingOf",
          "source": {
            "href": "https://banes-lab.com/anatomy/pipeline#file-pipeline-core-converters-violation-converter-ts",
            "json": "https://banes-lab.com/json/source/pipeline/core/converters/violation.converter.ts",
            "label": "core/converters/violation.converter.ts",
            "markdown": "https://banes-lab.com/source/pipeline/core/converters/violation.converter.ts.md",
            "ref": "anatomy:file-pipeline-core-converters-violation-converter-ts"
          }
        }
      ],
      "exported": false,
      "flow": "leaf",
      "kind": "lexical_declaration",
      "line": 76,
      "name": "numberOr",
      "signature": "const numberOr = function numberOr(value: string | undefined): number | null {"
    },
    {
      "callable": true,
      "callees": [
        {
          "file": "core/converters/violation.converter.ts",
          "name": "numberOr",
          "source": {
            "href": "https://banes-lab.com/anatomy/pipeline#file-pipeline-core-converters-violation-converter-ts",
            "json": "https://banes-lab.com/json/source/pipeline/core/converters/violation.converter.ts",
            "label": "core/converters/violation.converter.ts",
            "markdown": "https://banes-lab.com/source/pipeline/core/converters/violation.converter.ts.md",
            "ref": "anatomy:file-pipeline-core-converters-violation-converter-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 81,
      "name": "findingOf",
      "signature": "const findingOf = function findingOf(line: string, step: string): Violation | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 16,
      "name": "ROOT_POSIX",
      "signature": "const ROOT_POSIX = ROOT.split(\"\\\\\").join(\"/\");"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 18,
      "name": "sgrEnd",
      "signature": "const sgrEnd = function sgrEnd(text: string, at: number): number {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 26,
      "name": "stripAnsi",
      "signature": "export const stripAnsi = function stripAnsi(text: string): string {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 27,
      "name": "out",
      "signature": "let out = \"\";"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 37,
      "name": "withoutTrailingReturn",
      "signature": "export const withoutTrailingReturn = function withoutTrailingReturn(text: string): string {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 41,
      "name": "gapEnd",
      "signature": "const gapEnd = function gapEnd(text: string, at: number): number {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 42,
      "name": "scan",
      "signature": "let scan = at;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 49,
      "name": "splitOnGaps",
      "signature": "export const splitOnGaps = function splitOnGaps(text: string): string[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 51,
      "name": "start",
      "signature": "let start = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 52,
      "name": "at",
      "signature": "let at = 0;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 54,
      "name": "end",
      "signature": "const end = GAP_CHARS.has(text.charAt(at)) ? gapEnd(text, at) : at + 1;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 65,
      "name": "fileHeaderOf",
      "signature": "const fileHeaderOf = function fileHeaderOf(line: string): string | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 69,
      "name": "posix",
      "signature": "const posix = line.trim().split(\"\\\\\").join(\"/\");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 82,
      "name": "parts",
      "signature": "const parts = line.startsWith(\" \") ? splitOnGaps(line.trim()) : [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 86,
      "name": "rest]",
      "signature": "const [position = \"\", severity = \"\", ...rest] = parts;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 87,
      "name": "[lineText, columnText]",
      "signature": "const [lineText, columnText] = position.split(POSITION_SEPARATOR);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 88,
      "name": "lineNumber",
      "signature": "const lineNumber = numberOr(lineText);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 92,
      "name": "rule",
      "signature": "const rule = rest.length > 1 ? (rest.at(-1) ?? \"\") : \"\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 93,
      "name": "message",
      "signature": "const message = (rest.length > 1 ? rest.slice(0, -1) : rest).join(MESSAGE_JOIN);"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 97,
      "name": "parseViolations",
      "signature": "export const parseViolations = function parseViolations(output: string, step: string): ParsedOutput {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 99,
      "name": "current",
      "signature": "let current: string | null = null;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 101,
      "name": "line",
      "signature": "const line = withoutTrailingReturn(stripAnsi(raw));"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 102,
      "name": "header",
      "signature": "const header = fileHeaderOf(line);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 103,
      "name": "finding",
      "signature": "const finding = header === null && current !== null ? findingOf(line, step) : null;"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 112,
      "name": "buildViolations",
      "signature": "export const buildViolations = function buildViolations("
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 118,
      "name": "files",
      "signature": "const files = new Map<string, Violation[]>();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 119,
      "name": "unparsed",
      "signature": "const unparsed: Record<string, string> = {};"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 121,
      "name": "parsed",
      "signature": "const parsed = parseViolations(output.out, output.label);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": true,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 129,
      "name": "sorted",
      "signature": "const sorted = [...files.entries()].toSorted((a, b) => a[0].localeCompare(b[0]));"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/pipeline#file-pipeline-core-converters-violation-converter-ts",
  "language": "typescript",
  "layer": "processing",
  "name": "violation.converter.ts",
  "path": "core/converters/violation.converter.ts",
  "ref": "anatomy:file-pipeline-core-converters-violation-converter-ts",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/pipeline#folder-pipeline-core-converters",
          "json": "https://banes-lab.com/json/anatomy/pipeline/folder-pipeline-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/pipeline/folder-pipeline-core-converters.md",
          "ref": "chapter:/anatomy/pipeline#folder-pipeline-core-converters"
        }
      ],
      "relation": "contained-in"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/pipeline#folder-pipeline-core-converters",
          "json": "https://banes-lab.com/json/anatomy/pipeline/folder-pipeline-core-converters",
          "label": "core/converters",
          "markdown": "https://banes-lab.com/anatomy/pipeline/folder-pipeline-core-converters.md",
          "ref": "chapter:/anatomy/pipeline#folder-pipeline-core-converters"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "converter",
    "subject": "violation",
    "variant": null
  },
  "stats": {
    "bytes": 4811,
    "callable": 10,
    "definitions": 31,
    "edges": 1,
    "exported": 18,
    "files": 1,
    "findings": {},
    "flows": {
      "leaf": 1,
      "entry": 1,
      "isolated": 29
    },
    "lines": {
      "blank": 11,
      "code": 127,
      "total": 138
    }
  },
  "summary": "127 lines of code and 31 definitions.",
  "text": "https://banes-lab.com/source/pipeline/core/converters/violation.converter.ts.txt",
  "tree": "pipeline",
  "siblings": {
    "next": null,
    "previous": {
      "href": "https://banes-lab.com/anatomy/pipeline#file-pipeline-core-converters-stage-converter-ts",
      "json": "https://banes-lab.com/json/source/pipeline/core/converters/stage.converter.ts",
      "label": "core/converters/stage.converter.ts",
      "markdown": "https://banes-lab.com/source/pipeline/core/converters/stage.converter.ts.md",
      "ref": "anatomy:file-pipeline-core-converters-stage-converter-ts"
    }
  },
  "up": {
    "href": null,
    "json": "https://banes-lab.com/json/api/source/pipeline/core/converters",
    "label": "core/converters",
    "markdown": "https://banes-lab.com/api/source/pipeline/core/converters.md",
    "ref": "api:source/pipeline/core/converters"
  }
}
