{
  "$defs": {
    "BaselineEntry": {
      "additionalProperties": false,
      "description": "The entry of a group names no file or function. One written before a group was keyed by its\nmodules names those of the import closing the cycle its report showed.",
      "properties": {
        "count": {
          "description": "How many violation sites the entry allows.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "group": {
          "description": "The name of the group the entry is in, one of `groups`; left out for an entry in none.",
          "type": "string"
        },
        "heuristic": {
          "description": "How many of `count` were heuristic: left out when none were, and in files written before\nversion 3.",
          "format": "uint32",
          "minimum": 0,
          "type": "integer"
        },
        "path": {
          "description": "The file of the report, relative to the project root with forward slashes; left out for a\ngroup of modules.",
          "type": "string"
        },
        "qualname": {
          "description": "The qualified name of the function the report is in; left out at module level and for a\ngroup of modules.",
          "type": "string"
        },
        "rule_code": {
          "description": "The code of the rule that reports (`EFF101`).",
          "type": "string"
        },
        "target": {
          "description": "What the report is about, as the report names it.",
          "type": "string"
        }
      },
      "required": [
        "rule_code",
        "target",
        "count"
      ],
      "type": "object"
    },
    "BaselineGroup": {
      "additionalProperties": false,
      "description": "A group of baseline entries.",
      "properties": {
        "name": {
          "description": "The name entries give in `group`; no two groups share one.",
          "type": "string"
        },
        "reason": {
          "description": "Why the entries of the group are allowed; not blank.",
          "pattern": "\\S",
          "type": "string"
        }
      },
      "required": [
        "name",
        "reason"
      ],
      "type": "object"
    }
  },
  "$id": "https://heki.koxudaxi.dev/schemas/baseline-4.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "On-disk shape: `version`, then `[[entries]]` sorted by key (minimal git diffs).",
  "properties": {
    "entries": {
      "description": "The reports the baseline allows, sorted by path, qualified name, rule code, and target.",
      "items": {
        "$ref": "#/$defs/BaselineEntry"
      },
      "type": "array"
    },
    "groups": {
      "description": "The groups entries can be in, each with the reason its entries are allowed, sorted by\nname.",
      "items": {
        "$ref": "#/$defs/BaselineGroup"
      },
      "type": "array"
    },
    "version": {
      "const": 4,
      "description": "4: version 3, with groups that give entries a reason.",
      "type": "integer"
    }
  },
  "required": [
    "entries",
    "version"
  ],
  "title": "heki Ratchet baseline, version 4",
  "type": "object"
}
