# keryn rules lint

Describes Keryn 0.5.2 and keryn-rules 0.8.0.

> keryn rules lint: check rule files (structure, and what this engine can run)

Source: https://keryn.dev/docs/reference/cli/rules-lint/

Check rule files (structure, and what this engine can run).

```text
keryn rules lint [file|bundled:id ...]
```

## Options

```text
Usage: keryn rules lint [file|bundled:<pack> ...]
                       [--json] [--fail-on-unsupported] [-q]
  Inputs: YAML rules, gitleaks TOML configs, or bundled packs.
  Default target: bundled:aibom. Runs offline.
  --json  Print the lint report as JSON.
  -q      Suppress the text report.
  Exit 0: no errors and no requested coverage failure.
  Exit 1: invalid rules or gitleaks config.
  Exit 2: invalid arguments or unreadable input.
  Exit 3: unsupported or partially supported rules
          with --fail-on-unsupported.
  Exit 4: internal error.
```

## Examples

```sh
# Check structure and support.
keryn rules lint my-rules.yml

# Lint every bundled pack.
keryn rules lint bundled:all --json
```

## Exit codes

| Code | Meaning |
|---|---|
| 0 | no errors or requested coverage failure |
| 1 | invalid rules or gitleaks config |
| 2 | invalid arguments or unreadable input |
| 3 | unsupported or partially supported rules with --fail-on-unsupported |
| 4 | internal error |
