{
  "definitions": [
    {
      "callable": true,
      "callees": [
        {
          "file": "core/predicates/knob.predicate.ts",
          "name": "isThreshold",
          "source": {
            "href": "https://banes-lab.com/anatomy/quality#file-quality-core-predicates-knob-predicate-ts",
            "json": "https://banes-lab.com/json/source/quality/core/predicates/knob.predicate.ts",
            "label": "core/predicates/knob.predicate.ts",
            "markdown": "https://banes-lab.com/source/quality/core/predicates/knob.predicate.ts.md",
            "ref": "anatomy:file-quality-core-predicates-knob-predicate-ts"
          }
        }
      ],
      "callers": [],
      "exported": false,
      "flow": "entry",
      "kind": "lexical_declaration",
      "line": 114,
      "name": "knobs",
      "signature": "const knobs = async function knobs(): Promise<KnobEntry[]> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 10,
      "name": "TOOL",
      "signature": "const TOOL = \"golangci-lint\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 11,
      "name": "DOCS",
      "signature": "const DOCS = \"https://golangci-lint.run/usage/linters/#\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 12,
      "name": "SCHEMA",
      "signature": "const SCHEMA = \"https://raw.githubusercontent.com/golangci/golangci-lint/main/jsonschema/golangci.next.jsonschema.json\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 13,
      "name": "SCHEMA_WINDOW",
      "signature": "const SCHEMA_WINDOW = 4000;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 14,
      "name": "AGGREGATORS",
      "signature": "const AGGREGATORS: ReadonlySet<string> = new Set(["
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 22,
      "name": "SECTION_TOGGLE",
      "signature": "const SECTION_TOGGLE: ReadonlyMap<string, boolean> = new Map(["
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 26,
      "name": "STOP_PREFIXES",
      "signature": "const STOP_PREFIXES = [\"Linters presets:\", \"Linters:\"];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 27,
      "name": "KNOB_SETTINGS",
      "signature": "const KNOB_SETTINGS: readonly [string, string][] = ["
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 42,
      "name": "stripFlags",
      "signature": "const stripFlags = function stripFlags(text: string): { desc: string; flags: string[] } {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 43,
      "name": "desc",
      "signature": "let desc = text;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 44,
      "name": "flags",
      "signature": "const flags: string[] = [];"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 46,
      "name": "open",
      "signature": "const open = desc.lastIndexOf(\"[\");"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 53,
      "name": "linterRule",
      "signature": "const linterRule = function linterRule(line: string, enabled: boolean, version: string): CatalogRule | null {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 54,
      "name": "colon",
      "signature": "const colon = line.indexOf(\": \");"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 58,
      "name": "name",
      "signature": "const name = line.slice(0, colon);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 59,
      "name": "{ desc, flags }",
      "signature": "const { desc, flags } = stripFlags(line.slice(colon + \": \".length).trim());"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 77,
      "name": "linters",
      "signature": "const linters = function linters(lines: readonly string[], version: string): CatalogRule[] {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 79,
      "name": "enabled",
      "signature": "let enabled: boolean | null = null;"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 81,
      "name": "text",
      "signature": "const text = raw.trim();"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 85,
      "name": "toggled",
      "signature": "const toggled = SECTION_TOGGLE.get(text);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 87,
      "name": "rule",
      "signature": "const rule ="
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 96,
      "name": "count",
      "signature": "const count = function count(rules: readonly CatalogRule[], key: string): number {"
    },
    {
      "callable": true,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 100,
      "name": "produce",
      "signature": "const produce = async function produce(): Promise<CatalogProduct[]> {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 101,
      "name": "version",
      "signature": "const version = commandVersion(TOOL, [\"version\"]);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 102,
      "name": "rules",
      "signature": "const rules = linters(commandOutput(TOOL, [\"help\", \"linters\"]).split(\"\\n\"), version).toSorted(byRuleId);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 103,
      "name": "summary",
      "signature": "const summary = {"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 115,
      "name": "schema",
      "signature": "const schema = (await remoteText(SCHEMA)) ?? \"\";"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 117,
      "name": "at",
      "signature": "const at = schema.indexOf(`\"${linter}\"`);"
    },
    {
      "callable": false,
      "callees": [],
      "callers": [],
      "exported": false,
      "flow": "isolated",
      "kind": "lexical_declaration",
      "line": 118,
      "name": "value",
      "signature": "const value = at === -1 ? null : intAfter(schema, `\"${setting}\"`, { from: at, window: SCHEMA_WINDOW });"
    }
  ],
  "document": null,
  "findings": [],
  "generated": false,
  "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-golangci-lint-producer-ts",
  "language": "typescript",
  "layer": "application",
  "name": "tool.golangci-lint.producer.ts",
  "path": "core/producers/tool.golangci-lint.producer.ts",
  "ref": "anatomy:file-quality-core-producers-tool-golangci-lint-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-predicates-knob-predicate-ts",
          "json": "https://banes-lab.com/json/source/quality/core/predicates/knob.predicate.ts",
          "label": "core/predicates/knob.predicate.ts",
          "markdown": "https://banes-lab.com/source/quality/core/predicates/knob.predicate.ts.md",
          "ref": "anatomy:file-quality-core-predicates-knob-predicate-ts"
        }
      ],
      "relation": "uses"
    },
    {
      "links": [
        {
          "href": "https://banes-lab.com/anatomy/quality#folder-quality-core-predicates",
          "json": "https://banes-lab.com/json/anatomy/quality/folder-quality-core-predicates",
          "label": "core/predicates",
          "markdown": "https://banes-lab.com/anatomy/quality/folder-quality-core-predicates.md",
          "ref": "chapter:/anatomy/quality#folder-quality-core-predicates"
        }
      ],
      "relation": "linked-from"
    }
  ],
  "slots": {
    "concern": "producer",
    "subject": "tool",
    "variant": "golangci-lint"
  },
  "stats": {
    "bytes": 4646,
    "callable": 6,
    "definitions": 30,
    "edges": 1,
    "exported": 0,
    "files": 1,
    "findings": {},
    "flows": {
      "entry": 1,
      "isolated": 29
    },
    "lines": {
      "blank": 8,
      "code": 117,
      "total": 125
    }
  },
  "summary": "117 lines of code and 30 definitions.",
  "text": "https://banes-lab.com/source/quality/core/producers/tool.golangci-lint.producer.ts.txt",
  "tree": "quality",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-gosec-producer-ts",
      "json": "https://banes-lab.com/json/source/quality/core/producers/tool.gosec.producer.ts",
      "label": "core/producers/tool.gosec.producer.ts",
      "markdown": "https://banes-lab.com/source/quality/core/producers/tool.gosec.producer.ts.md",
      "ref": "anatomy:file-quality-core-producers-tool-gosec-producer-ts"
    },
    "previous": {
      "href": "https://banes-lab.com/anatomy/quality#file-quality-core-producers-tool-detekt-producer-ts",
      "json": "https://banes-lab.com/json/source/quality/core/producers/tool.detekt.producer.ts",
      "label": "core/producers/tool.detekt.producer.ts",
      "markdown": "https://banes-lab.com/source/quality/core/producers/tool.detekt.producer.ts.md",
      "ref": "anatomy:file-quality-core-producers-tool-detekt-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"
  }
}
