CI Mode
Use --ci to exit with code 1 when any finding exceeds the configured risk threshold.
Basic
bash
pgfence analyze --ci migrations/*.sql With the default --max-risk high threshold, only CRITICAL findings fail.
Custom Threshold
bash
pgfence analyze --ci --max-risk medium migrations/*.sql With --max-risk medium, HIGH or CRITICAL findings fail.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | All checks passed (or within threshold) |
| 1 | Risk threshold exceeded or policy violation |
| 2 | Parse error or invalid input |