Options
Output
| Flag | Description |
|---|---|
-f, --format <FORMAT> | Output format: human (default), json, sarif, compact, markdown, codeclimate |
-q, --quiet | Suppress progress output |
--fail-on-issues | Exit with code 1 if issues are found |
--sarif-file <PATH> | Write SARIF output to a file (in addition to --format) |
--ci | CI mode: sets format to SARIF, enables fail-on-issues, suppresses progress. Individual flags can still override. |
--explain | Add metric explanations. In human format, explanations are always shown. In JSON format, adds a _meta object with metric descriptions and docs links. |
--group-by <MODE> | Group output by owner (CODEOWNERS), directory (first path component), or package (workspace package). See global flags. |
--summary | Print a one-line summary of issue counts at the end of the run. In JSON format, adds a summary counts object. |
Filtering
| Flag | Description |
|---|---|
--unused-files | Only report unused files |
--unused-exports | Only report unused exports |
--unused-types | Only report unused types |
--unused-deps | Only report unused dependencies |
--unused-optional-deps | Only report unused optional dependencies |
--unused-enum-members | Only report unused enum members |
--unused-class-members | Only report unused class members |
--unresolved-imports | Only report unresolved imports |
--unlisted-deps | Only report unlisted dependencies |
--duplicate-exports | Only report duplicate exports |
--circular-deps | Only report circular dependencies |
--boundary-violations | Only report boundary violations |
--type-only-deps | Only report type-only dependencies |
--include-dupes | Also run duplication analysis and cross-reference with dead code |
Incremental
| Flag | Description |
|---|---|
--changed-since <REF> | Only check files changed since a git ref |
--baseline <PATH> | Compare against a previously saved baseline file |
--save-baseline <PATH> | Save current results as a baseline file |
--production | Production mode (exclude test/story/dev files) |
--top <N> | Show only the top N items per issue category in human output |
Regression detection
| Flag | Description |
|---|---|
--fail-on-regression | Fail if issue count increased beyond tolerance vs a regression baseline |
--tolerance <N> | Allowed increase: "2%" (percentage) or "5" (absolute). Default: "0" |
--regression-baseline <PATH> | Path to regression baseline file (default: .fallow/regression-baseline.json) |
--save-regression-baseline <PATH> | Save current issue counts as a regression baseline |
Debugging flags
Debugging flags
These flags help you understand how fallow resolves your code and where time is spent.
| Flag | Description |
|---|---|
--trace <FILE:EXPORT> | Trace usage of a specific export |
--trace-file <PATH> | Show all edges for a file |
--trace-dependency <PACKAGE> | Show where a dependency is used |
--performance | Show pipeline timing breakdown |
Examples
Regression detection
Save a regression baseline on your main branch, then compare on subsequent runs (e.g., in PR checks) to prevent issue count from growing. Workflow:-
Save a regression baseline on
main:This writes issue counts to.fallow/regression-baseline.json(or a custom path). -
On each PR, compare against the baseline:
Exits with code 1 if the total issue count exceeds the baseline plus the configured tolerance.
-
Optionally set a tolerance to allow small fluctuations:
--fail-on-regression is used with --format json, the output includes an optional regression object:
| Field | Description |
|---|---|
status | pass, exceeded, or skipped |
baseline_total | Issue count from the baseline file |
current_total | Issue count from the current run |
delta | current_total - baseline_total |
tolerance | Configured tolerance value |
tolerance_kind | percentage or absolute |
exceeded | Whether the delta exceeds the tolerance |
reason | Only present when status is skipped (e.g., baseline file not found) |
Example output
$ fallow dead-code --format compact
Grouped output
Use--group-by to partition issues by ownership or directory. This works with all output formats.
--format json, grouped output wraps the normal structure:
Fix suggestions in JSON output
When using--format json, every issue includes an actions array with machine-actionable fix and suppress hints. This lets agents and CI scripts programmatically decide how to resolve each finding.
| Field | Description |
|---|---|
type | One of 14 fix action types in kebab-case (e.g. remove-export, remove-file, suppress-line, add-to-config) |
auto_fixable | true when fallow fix can handle this action automatically |
description | Human-readable explanation of the action |
comment | (optional) The inline suppression comment to add |
note | (optional) Additional context for non-auto-fixable items |
config_key | (optional) The config key to modify, e.g. "ignoreDependencies" for dependency issues |
scope | (optional) Present on duplicate_exports suppress actions as "per-location" since those span multiple files |
Re-export findings include a warning note about public API surface impact. Dependency issues use
add-to-config suppress (not inline comments) with the concrete package name and config_key: "ignoreDependencies".Additional JSON fields
When using--format json, the output may include these additional top-level objects:
entry_points
Lists all resolved entry point files that root the module graph:
summary
When --summary is used, a summary counts object is included:
baseline_deltas
When --baseline is used, a baseline_deltas object shows changes since the baseline:
See also
Dead code analysis
How fallow detects dead code.
Rules configuration
Configure severity and thresholds per rule.
Production mode
Analyze only shipping code.