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
| Fact | Value |
|---|---|
| Issue type | feature-flag |
| Rule id in SARIF output | fallow/feature-flag |
| Command | fallow flags |
| Default severity | off |
Config key in rules | feature-flags |
| Suppression comment | // fallow-ignore-next-line feature-flag |
Fixable with fallow fix | No |
| Opt-in | Yes |
Note. Reported by fallow flags.