flaglint scan
flaglint scan performs AST-based inventory of supported direct LaunchDarkly Node.js server SDK calls.
Command
Section titled “Command”npx flaglint scan ./srcOptions
Section titled “Options”| Option | Description |
|---|---|
--format json | Write structured JSON. |
--format markdown | Write a Markdown report. |
--format html | Write an HTML report. |
--format sarif | Write inventory SARIF. Use validate --format sarif for policy enforcement. |
--output <file> | Write report to a file. |
--config <path> | Use an explicit config file. |
--exclude-tests | Exclude test/spec files and test directories. |
Example Output
Section titled “Example Output”Generated from examples/enterprise-checkout-service/src:
- Scanning ./examples/enterprise-checkout-service/src...✓ 20 flag usages found across 11 unique flags (90ms)ℹ 1 dynamic flag key(s) require manual reviewMarkdown Report Excerpt
Section titled “Markdown Report Excerpt”## Usages by File### checkout.ts- Line 40: `checkout-v2` (boolVariation)- Line 49: `payment-provider` (stringVariation)- Line 58: `one-click-checkout` (boolVariation)- Line 67: `checkout-currency` (stringVariation)Exit Behavior
Section titled “Exit Behavior”scan exits 1 only when configured review signals mark non-dynamic, non-bulk flags as stale candidates. A one-file flag is not stale by default because minFileCount defaults to 0.