Skip to main content

Quick setup

complior scan --ci --json --threshold 70
  • --ci — exit code 1 if score below threshold, exit code 0 if above
  • --json — structured JSON output (also supports --sarif for GitHub Code Scanning)
  • --threshold 70 — minimum compliance score to pass

GitHub Actions

name: Compliance Check
on: [push, pull_request]

jobs:
  compliance:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '22'
      - run: npm install -g complior
      - run: complior scan --ci --json --threshold 70
      - run: complior agent validate --ci

GitLab CI

compliance:
  image: node:22
  script:
    - npm install -g complior
    - complior scan --ci --json --threshold 70
    - complior agent validate --ci
  artifacts:
    reports:
      codequality: .complior/reports/scan-report.json

Output formats

FormatFlagUse case
JSON--jsonCustom integrations, dashboards
SARIF--sarifGitHub Code Scanning, VS Code

Passport validation in CI

# Fail CI if any passport has errors
complior agent validate --ci

# Strict mode: warnings also fail
complior agent validate --ci --strict