# Other CI providers

The [GitHub Action](/docs/ci-and-prs/github-actions-setup) handles comments and commit statuses, so it only runs on GitHub. The scanner itself is a CLI, so it runs on any provider: GitLab CI, CircleCI, Jenkins, Buildkite, or a plain script.

## Exit codes

By default, React Doctor exits `1` for blocking issues and `0` otherwise. Use `--warning-exit-code` to give non-blocking warnings a separate status. See the [GitLab warning status example](#gitlab-warning-status).

```bash
# Scan the whole project. Fails the job on error-level issues (the default).
npx react-doctor@latest .
```

## Useful flags

<table>
  <thead>
    <tr>
      <th>Flag</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>
        <code>--blocking &lt;level&gt;</code>
      </td>
      <td>
        Level that exits <code>1</code>: <code>error</code> (default),{" "}
        <code>warning</code>, or <code>none</code> (report only, always exit{" "}
        <code>0</code>)
      </td>
    </tr>
    <tr>
      <td>
        <code>--scope &lt;value&gt;</code>
      </td>
      <td>
        Choose <code>full</code>, <code>files</code>, <code>changed</code>,{" "}
        <code>lines</code>, or <code>contextual</code>. Add{" "}
        <code>--base &lt;ref&gt;</code> for a specific base
      </td>
    </tr>
    <tr>
      <td>
        <code>--project &lt;name&gt;</code>
      </td>
      <td>In a monorepo, scan only certain project(s), comma-separated</td>
    </tr>
    <tr>
      <td>
        <code>--json</code>
      </td>
      <td>Print a JSON report instead of text, for processing</td>
    </tr>
  </tbody>
</table>

See the [CLI reference](/docs/reference/cli-reference) for the full list.

## GitLab CI

Generate a gate-only GitLab CI scaffold:

```bash
npx react-doctor@latest ci install --provider gitlab-ci
```

You can also add the job manually:

```yaml
react-doctor:
  image: node:24
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
  script:
    # Only scan files changed against the target branch.
    - npx react-doctor@latest . --scope changed --base "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" --blocking error
```

If the job exits non-zero, the pipeline fails. That is the same gate as the GitHub Action, without the comments.

### GitLab warning status

For a GitLab warning status without blocking a merge, use a separate warning exit code:

```yaml
react-doctor:
  image: node:24
  script:
    - npx react-doctor@latest . --warning-exit-code 123
  allow_failure:
    exit_codes: 123
```

With the default `--blocking error`, this example uses these exit codes:

- `1` for errors and hard lint failures.
- `123` for warnings.
- `0` for clean scans.

The warning code must be an integer from `2` to `255`. Without `--warning-exit-code`, warnings exit with `0`.

`--blocking warning` takes priority and exits with `1` for warnings. `--blocking none` disables the warning exit code. Score-only mode and degraded baseline comparisons also skip the warning exit code.

Warning filters and `ciFailure` surface settings still apply.

## CircleCI, Jenkins, and Buildkite

Run `npx react-doctor@latest` in a Node 24 step. The exit code determines whether the step passes or fails.
