Skip to content
Fallow home
All docs pages

Docs home

VS Code extension

Install the fallow extension for VS Code to see findings as you edit, with its commands, settings and binary resolution.

You write code in VS Code, and an export that nothing uses stays there until a CI job or a reviewer finds it. With the fallow extension, the finding shows while you edit. In the demo project, the Problems panel lists Export 'cancelOrder' is unused for src/services/orders.ts, and a quick fix removes the export.

The extension starts fallow-lsp, the language server of fallow. The server runs the same analysis as the CLI and CI, so the editor shows the findings that the CI job reports.

Before you start

  • VS Code 1.96 or later.
  • A JavaScript or TypeScript project. Install its dependencies, because fallow reads the packages in node_modules.

Steps

  1. Install the extension. Search for "fallow" in the Extensions view, or run:

    code --install-extension fallow-rs.fallow-vscode
  2. Open the project folder. The extension finds or downloads fallow-lsp, and runs the first analysis.

  3. Open the Fallow view in the activity bar to see the findings by type.

On the first install, a Getting Started walkthrough opens. To open it again, use the Command Palette.

What you get

The extension shows each finding in the place where you work on the code:

  • Diagnostics. Each finding shows in the editor and in the Problems panel. The code of a diagnostic, for example unused-export, links to its documentation.
  • Code lens. Above each used export, imported by N files shows how many files import it. Click it to see the imports.
  • Hover. An export shows the number of files that import it. Duplicated code shows the other places of the clone group.
  • Quick fixes. Remove an unused export, delete an unused file, or copy the finding id of a finding. On cancelOrder, the quick fix is Remove unused export `cancelOrder` . The extension offers this quick fix only when the open file parses, and only when each name of the declaration is unused.
  • Sidebar views. Unused Code, Duplicates, Health, Security Candidates and Runtime Coverage. The Security Candidates view is off by default. The Runtime Coverage view stays empty until you load a capture.
  • Status bar. One Fallow item shows the finding count and the health grade. Its hover gives the counts by type and the audit verdict of your change. A click opens a menu.
  • Config file support. Autocomplete and validation for .fallowrc.json.

The extension reads the config file of the project, so the editor reports the same findings as the CLI. To hide one type in the editor only, set it to false in fallow.issueTypes.

Show only the findings of new code

An old project can have hundreds of findings, and then a new finding of your own change is hard to see. Run Fallow: Set Baseline at HEAD. The command creates the local git tag fallow-baseline at HEAD and sets fallow.changedSince to it. The editor then shows only the findings in files that changed after the tag. The command does not push the tag.

Binary resolution

The extension needs a fallow-lsp binary, and the version of that binary decides which findings you see. It looks for the binary in this order:

  1. The fallow.lspPath setting.
  2. The node_modules of the workspace, from a development dependency on fallow.
  3. PATH.
  4. A binary that the extension downloaded before.
  5. A download from the GitHub release, when fallow.autoDownload is on. Otherwise the extension asks you.

A development dependency in the project comes before PATH and the download, so it gives the editor the same version as the CLI and CI. The extension verifies the Ed25519 signature of each binary that it downloads, and does not install a binary without a valid signature.

Check the result

Run Fallow: Show Output Channel. The lines that start with Binary resolution: name the binary that the extension uses, and where it found the binary. With fallow in the project, the line starts with Binary resolution: using local node_modules:. The Fallow item in the status bar shows the finding count after the first analysis.

If it fails

  • No diagnostics. Open the output channel and read the binary resolution lines. When the extension found no binary, install fallow in the project, or set fallow.lspPath.
  • configured LSP path ... does not point to a fallow-lsp binary. Correct fallow.lspPath, or clear it to use the automatic resolution.
  • The editor shows other findings than the CLI. Check fallow.production, fallow.changedSince and fallow.issueTypes. These settings apply only to the editor.
  • A diagnostic does not update. Fallow updates the diagnostics when you save a file. Run Fallow: Restart Language Server when they stay old.

Reference

Commands

Run each command from the Command Palette.

CommandID
Fallow: Run Analysisfallow.analyze
Fallow: Reload Healthfallow.health.reload
Fallow: Scan for Security Candidatesfallow.analyzeSecurity
Fallow: Inspect Active Filefallow.inspectActiveFile
Fallow: Inspect Symbol at Cursorfallow.inspectActiveSymbol
Fallow: Set Baseline at HEADfallow.setBaselineAtHead
Fallow: Select Workspace Scope...fallow.selectWorkspace
Fallow: Clear Workspace Scope (Analyze All)fallow.clearWorkspace
Fallow: Load Runtime Coveragefallow.loadCoverage
Fallow: Reload Runtime Coveragefallow.reloadCoverage
Fallow: Clear Runtime Coveragefallow.clearCoverage
Fallow: Audit Changed Filesfallow.audit
Fallow: Auto-Fix (unexport unused, remove unused deps)fallow.fix
Fallow: Preview Fixes (Dry Run)fallow.fixDryRun
Fallow: Restart Language Serverfallow.restart
Fallow: Show Output Channelfallow.showOutput
Fallow: Open Sidebarfallow.openSidebar
Fallow: Open Settingsfallow.openSettings
Fallow: Enable Security Candidatesfallow.enableSecurity
Fallow: Enable Health Viewfallow.enableHealth
Fallow: Toggle Hide Code-Duplication Findingsfallow.toggleMuteDuplicates
Fallow: Toggle Hide All Findingsfallow.toggleAllDiagnostics
Fallow: Show Status Menufallow.showStatusMenu
Fallow: Manage Hidden Findings...fallow.manageDiagnosticMutes
Fallow: Show All Findingsfallow.clearDiagnosticMutes
Fallow: Reset Hidden Findings (Restart Server)fallow.resetDiagnosticFilters
Fallow: Activate Licensefallow.license.activate
Fallow: Show License Statusfallow.license.status
Fallow: Refresh Licensefallow.license.refresh
Fallow: Deactivate Licensefallow.license.deactivate

Settings

SettingDefaultDescription
fallow.lspPathemptyPath to the fallow-lsp binary.
fallow.configPathemptyPath to a Fallow config file.
fallow.allowRemoteExtendsfalseAllow the language server to load trusted https:// config inheritance.
fallow.typeAware.enabledfalseRefine Fallow's project-wide public API analysis with TypeScript symbol identity.
fallow.typeAware.projects[]Optional tsconfig paths for type-aware analysis.
fallow.typeAware.requirebest-effortChoose whether incomplete semantic evidence stays advisory or fails the analysis after emitting its conservative result.
fallow.typeAware.timeoutSeconds0Wall clock in seconds allowed for one semantic request, forwarded to the CLI as FALLOW_TYPE_AWARE_TIMEOUT_SECS.
fallow.autoDownloadtrueAutomatically download managed fallow-lsp and fallow CLI binaries if not found.
fallow.issueTypeseach type onToggle individual issue types on or off.
fallow.duplication.threshold0Maximum allowed duplication percentage before the analysis is marked as failing.
fallow.duplication.minTokens50Minimum token count for a clone before it can be reported as duplicated code.
fallow.duplication.minLines5Minimum line count for a clone before it can be reported as duplicated code.
fallow.duplication.minOccurrences2Minimum number of occurrences (instances of the same clone) before a group is reported.
fallow.duplication.modemildDuplication detection mode.
fallow.duplication.nearfalseDetect function-scoped near-miss clones with small structural edits in addition to exact clones.
fallow.duplication.skipLocalfalseOnly report duplicate code that appears across different directories.
fallow.duplication.crossLanguagefalseCompare TypeScript and JavaScript files after stripping TypeScript type annotations.
fallow.duplication.ignoreImportstrueExclude import declarations from duplicate-code detection.
fallow.duplication.ignoreSymlinksfalseOmit clone instances whose path is a symlink or lies under a symlinked directory.
fallow.productionautoProduction mode for the sidebar tree and the editor diagnostics (they stay in sync).
fallow.coverage.capturePathemptyPath to a local runtime-coverage capture (a file or directory).
fallow.coverage.top0Show only the top N hot paths and findings in the Runtime Coverage view (mirrors the CLI's --top).
fallow.changedSinceemptyShow only issues in files changed since the given git ref.
fallow.packageBaselinestrueApply the per-package refs of workspaces.changedSince from the Fallow config.
fallow.health.enabledtrueShow the Fallow Health view (score and grade, complexity findings, hotspot candidates, refactoring candidates).
fallow.health.hotspotstrueShow git churn hotspots in the Health view.
fallow.health.topFindings20Maximum number of complexity findings shown in the Health view (passed to fallow health --top).
fallow.health.statusBartrueShow the project health score and grade in the Fallow status bar item.
fallow.health.inlineComplexitytrueShow a compact complexity lens (N cyc, N cog) above functions that exceed Fallow Health thresholds.
fallow.complexity.breakdownEnabledtrueShow the inline complexity breakdown in the editor: a per-line marker and hover that explain WHY a function scored high (each else if, nested if, boolean operator, loop, ... with its cyclomatic/cognitive weight), plus a CRAP explanation on the function line.
fallow.complexity.afterTextfalseAlways show the dim per-line +N complexity breakdown for every complex function, instead of only the function you expand (via its lens) or select in the Health view.
fallow.complexity.decorationCap200How many top complexity findings to fetch for inline editor decorations when the breakdown is enabled.
fallow.workspaceemptyScope Fallow's sidebar analysis to a single monorepo workspace package, by name.
fallow.audit.gatenew-onlyWhich findings affect the audit verdict shown in the editor.
fallow.audit.worsenedautoHow an inherited complexity finding that got worse affects the audit verdict shown in the editor.
fallow.audit.statusBar.enabledtrueShow the audit verdict (pass/warn/fail) for the current change set in the Fallow status bar item: a warning or error background, an icon and a hover line.
fallow.audit.runOnSavefalseRe-run the audit verdict automatically when a JS/TS file is saved.
fallow.diagnostics.severitywarningRender Fallow editor diagnostics at the selected VS Code severity.
fallow.diagnostics.mutedCategories[]Team-shareable baseline of Fallow diagnostic categories to hide in the editor, such as code-duplication or stale-suppression.
fallow.trace.serveroffTrace level for the LSP server communication.
fallow.security.enabledfalseSurface local security candidates (client-server-leak, the tainted-sink CWE catalogue) from fallow security in the Security Candidates sidebar view.
fallow.license.showStatusBartrueShow the license state in the Fallow status bar item, but only when license material is present.
fallow.license.refreshOnStartupfalseProbe license status once when the extension activates.