Skip to main content
VectorLint exits with a non-zero status code when it finds violations, making it a natural fit for CI pipelines. Add it as a pre-merge check and content that fails your quality thresholds never reaches production.

How it works in CI

When VectorLint finds violations it exits with code 1. 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.

GitHub Actions

Basic setup

Add a workflow file at .github/workflows/vectorlint.yml:
The 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:
  1. Go to your repository Settings → Secrets and variables → Actions
  2. Add a new secret for each key (e.g. OPENAI_API_KEY, ANTHROPIC_API_KEY)
  3. Reference them in your workflow with ${{ secrets.SECRET_NAME }}

Checking only changed files

For large content libraries, reviewing every file on every PR is slow and expensive. Use git diff to review only the files changed in the PR:
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. Raise CONFIDENCE_THRESHOLD in CI. Set it higher than your local default so only the most certain findings block a merge:
Run the review only on production-bound content. Limit the workflow paths filter to directories that ship to users, not drafts or internal docs:

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 review. GitLab CI:
CircleCI:
Store API keys in your CI system’s secret or environment variable manager. Never store them in the workflow file itself.

Next steps