Skip to content
Fallow home
All docs pages

Docs home

Feature flags

What a feature-flag finding of fallow flags means, why it matters and how to fix it.

What it reports

Detected feature flag pattern.

Feature flags explains how fallow finds it.

Why it matters

A feature flag pattern detected by fallow flags: environment-variable checks, flag SDK calls (LaunchDarkly, Unleash, and similar), or config-object lookups. Long-lived flags accumulate dead branches; review old flags for retirement and pair with dead-code analysis to find branches that can no longer execute.

Example

src/checkout.ts checks process.env.FEATURE_NEW_CHECKOUT === 'true', or calls client.variation('new-checkout', user, false) of a flag SDK.

Fix

Check if the flag still switches behavior. Run fallow flags --retirement to list the flags that are ready to go, then remove the flag check and the branch that production no longer runs.

Facts

FactValue
Issue typefeature-flag
Rule id in SARIF outputfallow/feature-flag
Commandfallow flags
Default severityoff
Config key in rulesfeature-flags
Suppression comment// fallow-ignore-next-line feature-flag
Fixable with fallow fixNo
Opt-inYes

Note. Reported by fallow flags.