Skip to content
Fallow home
All docs pages

Docs home

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

ArgumentDescription
<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:

FieldContent
kind"explain"
idThe rule id, for example fallow/unused-export.
nameThe name of the issue type.
summaryOne line.
rationaleWhat the issue type reports, and why it matters.
exampleA short example.
example_filesThe 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_filesFor a rule of fallow audit, the same files before the change.
how_to_fixThe fix.
docsThe URL of the docs page.

Exit codes

CodeMeaning
0Fallow printed the explanation.
2Fallow 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
  • Issue types: one page for each issue type.
  • Rules: set the severity of an issue type.
  • MCP server: the fallow_explain tool runs this command.