pint.ok --no-color config
! stdout .
cmp stderr stderr.txt

-- stderr.txt --
level=info msg="Loading configuration file" path=.pint.hcl
{
  "ci": {
    "maxCommits": 20,
    "baseBranch": "master"
  },
  "prometheus": [
    {
      "name": "prom",
      "uri": "https://",
      "timeout": "2m",
      "required": true
    }
  ],
  "checks": {
    "enabled": [
      "alerts/annotation",
      "alerts/count",
      "alerts/for",
      "alerts/template",
      "promql/aggregate",
      "alerts/comparison",
      "promql/fragile",
      "promql/rate",
      "promql/regexp",
      "promql/syntax",
      "promql/vector_matching",
      "query/cost",
      "promql/series",
      "rule/label",
      "rule/reject"
    ]
  },
  "rules": [
    {},
    {
      "reject": [
        {
          "key": ".* +.*",
          "label_keys": true,
          "annotation_keys": true
        },
        {
          "key": "https?://.+",
          "label_keys": true,
          "label_values": true
        }
      ]
    },
    {
      "match": [
        {
          "path": "foo/bar",
          "kind": "alerting"
        }
      ],
      "ignore": [
        {
          "kind": "alerting",
          "label": {
            "key": "notify",
            "value": "blackhole"
          }
        },
        {
          "command": "watch"
        }
      ],
      "annotation": [
        {
          "key": "summary",
          "required": true,
          "severity": "bug"
        }
      ],
      "alerts": {
        "range": "7d",
        "step": "1m",
        "resolve": "5m"
      }
    },
    {
      "match": [
        {
          "kind": "recording"
        }
      ],
      "aggregate": [
        {
          "name": ".+",
          "keep": [
            "job"
          ]
        }
      ]
    },
    {
      "match": [
        {
          "kind": "recording"
        }
      ],
      "cost": {
        "bytesPerSample": 4036
      }
    }
  ]
}
-- .pint.hcl --
prometheus "prom" {
  uri     = "https://"
  timeout = "2m"
  required = true
}

rule{  }

rule {
  reject ".* +.*" {
    label_keys      = true
    annotation_keys = true
  }

  reject "https?://.+" {
    label_keys   = true
    label_values = true
  }
}


rule {
  match {
    kind = "alerting"
    path = "foo/bar"
  }
  ignore {
    kind = "alerting"
    label "notify" {
      value = "blackhole"
    }
  }
  ignore {
    command = "watch"
  }
  alerts {
    range   = "7d"
    step    = "1m"
    resolve = "5m"
  }
  annotation "summary" {
    severity = "bug"
    required = true
  }
}

rule {
  match {
    kind = "recording"
  }
  aggregate ".+" {
    keep = [ "job" ]
  }
}

rule {
  match {
    kind = "recording"
  }
  cost {
    bytesPerSample = 4036
  }
}
