Skip to main content
CI is the final check. If dead code slips through agent workflows or editor review, CI catches it before it lands in main.
1

Add the action

Add fallow to your workflow file:
name: Dead code analysis
on: [push, pull_request]

jobs:
  fallow:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: fallow-rs/fallow@v0
        with:
          format: sarif
2

Configure inputs

Customize the action with these inputs:
InputDefaultDescription
commandcheckCommand to run (check, dupes, fix)
formatsarifOutput format
productionfalseEnable production mode
changed-sinceOnly check files changed since this ref
baselinefalseCompare against saved baseline
3

Upload SARIF (optional)

Upload results to GitHub Code Scanning for inline annotations on the PR diff:
- uses: fallow-rs/fallow@v0
  with:
    format: sarif

- uses: github/codeql-action/upload-sarif@v3
  with:
    sarif_file: results.sarif
GitHub Actions job summary
fallow check 3 issues found

| Type | File | Symbol | Line |
|------|------|--------|------|
| unused-export | src/utils/format.ts | formatCurrency | 12 |
| unused-export | src/utils/format.ts | formatPercentage | 28 |
| unused-file | src/legacy/oldApi.ts | | |

Completed in 22ms
SARIF upload to GitHub Code Scanning shows dead code issues as inline annotations directly on the PR diff.
For pull requests, use --changed-since to only check files modified in the PR. This keeps CI fast and focuses feedback on new code.

PR-only analysis

- uses: fallow-rs/fallow@v0
  with:
    changed-since: ${{ github.event.pull_request.base.sha }}
Adopting fallow on a large codebase? Use baselines to avoid blocking on pre-existing issues while catching new ones.1. Save a baseline on your main branch:
npx fallow check --save-baseline
git add .fallow-baseline.json && git commit -m "chore: add fallow baseline"
2. In your PR workflow, compare against the baseline:
- run: npx fallow check --baseline
Only issues not present in the baseline will be reported. As your team cleans up existing dead code, periodically regenerate the baseline on main.
Baselines must be committed to your repo. Don’t regenerate on every CI run. That defeats the purpose of incremental adoption.

The three tracks together

CI is most powerful when combined with agent and editor integration:
  1. Agent generates code and runs fallow check --changed-since HEAD~1 to self-check
  2. Human reviews in VS Code, sees Code Lens annotations on new exports
  3. CI runs the full analysis. If something slipped through, CI catches it
The sub-second speed means fallow adds negligible time to your pipeline, even on large monorepos.

See also

Agent integration

How AI agents use fallow via CLI and MCP.

Rule configuration

Configure severity levels and issue types.

Production mode

Exclude test and dev files from analysis.