fallow explain
fallow explain prints what one issue type reports, why it matters and how to fix it, without an analysis.
Print what one issue type reports, why it matters, an example and the fix. Fallow runs no analysis.
Each issue type also has a page under Issue types.
Synopsis
fallow explain [OPTIONS] <ISSUE_TYPE>...
Options
| Argument | Description |
|---|---|
<ISSUE_TYPE...> | Issue type, issue label, or rule id to explain |
This command has no options of its own.
The global options are in these groups: Project, Output, Scope, Baselines, Gates, Duplication, Type-aware, Performance.
Fallow accepts the issue type id (unused-export), the rule id (fallow/unused-export), the plural form (unused-exports) and the label (unused exports). Fallow joins more than one word into one label, so fallow explain unused exports works without quotes.
Output
fallow explain unused-export
Unused Exports
fallow/unused-export
Export is never imported
Why it matters
An export that nothing imports looks like an API that other code depends on, so nobody dares to change or remove it. Code that only this export uses stays in the project with it.
Example
export const formatPrice = ... exists in src/money.ts, but no module imports formatPrice.
src/index.ts
import { formatTotal } from "./money";
console.log(formatTotal(1999));
src/money.ts
export const formatTotal = (cents: number): string => `${(cents / 100).toFixed(2)} EUR`;
export const formatPrice = (cents: number): string => `EUR ${cents / 100}`;
The output also has a "How to fix" section and a link to the docs.
With --format json, the output has these top-level fields:
| Field | Content |
|---|---|
kind | "explain" |
id | The rule id, for example fallow/unused-export. |
name | The name of the issue type. |
summary | One line. |
rationale | What the issue type reports, and why it matters. |
example | A short example. |
example_files | The files of a small project that makes the rule report a finding. Each file has a path and its code. The array is empty when the rule has no code example. |
example_base_files | For a rule of fallow audit, the same files before the change. |
how_to_fix | The fix. |
docs | The URL of the docs page. |
Exit codes
| Code | Meaning |
|---|---|
0 | Fallow printed the explanation. |
2 | Fallow does not know the issue type. The message gives valid examples. |
See Exit codes.
Examples
# Explain one issue type
fallow explain unused-export
# Explain an issue type by its label
fallow explain code duplication
# Get the explanation as JSON for an agent
fallow explain fallow/high-complexity --format json --quiet
Related
- Issue types: one page for each issue type.
- Rules: set the severity of an issue type.
- MCP server: the
fallow_explaintool runs this command.