How it works in CI
When VectorLint finds violations it exits with code1. When content passes all checks it exits with code 0. Most CI systems treat a non-zero exit as a failed step and block the merge automatically — no additional configuration needed.
| Exit code | Meaning |
|---|---|
0 | All files passed — no violations found |
1 | One or more violations found |
GitHub Actions
Basic setup
Add a workflow file at.github/workflows/vectorlint.yml:
paths filter limits the workflow to runs where content files actually changed — it won’t fire on code-only PRs.
Storing API keys
Never commit API keys to your repository. Store them as GitHub Actions secrets:- Go to your repository Settings → Secrets and variables → Actions
- Add a new secret for each key (e.g.
OPENAI_API_KEY,ANTHROPIC_API_KEY) - Reference them in your workflow with
${{ secrets.SECRET_NAME }}
Checking only changed files
For large content libraries, checking every file on every PR is slow and expensive. Usegit diff to check only the files changed in the PR:
Recommended CI configuration
CI environments should be stricter than local development. A finding a writer might dismiss in review becomes a merge blocker in CI — so surface only high-confidence violations. RaiseCONFIDENCE_THRESHOLD in CI. Set it higher than your local default so only the most certain findings block a merge:
paths filter to directories that ship to users, not drafts or internal docs:
.vectorlint.ini, apply strict scoring to the files that CI checks:
RunRules= means VectorLint skips them entirely.
Other CI systems
VectorLint works with any CI system that supports running shell commands. The pattern is the same: install VectorLint, set environment variables from secrets, run the check. GitLab CI:Next steps
- Tuning evaluation precision — set
CONFIDENCE_THRESHOLDand strictness for CI - Project Configuration — configure which files CI checks
- CLI reference — full command and exit code reference