Analyze function complexity and file-level health across your codebase. By default, fallow reports all standard health sections: health score, complexity findings, file health scores, hotspot analysis, and refactoring targets. Coverage layers are opt-in: static reachability viaDocumentation Index
Fetch the complete documentation index at: https://docs.fallow.tools/llms.txt
Use this file to discover all available pages before exploring further.
--coverage-gaps, exact CRAP scoring via --coverage, and runtime production evidence via --runtime-coverage.
Angular templates are scanned alongside JavaScript and TypeScript functions: external .html files referenced via templateUrl and inline @Component({ template: \…` })literals both contribute synthetic<template> findings when the template uses control-flow blocks (@if, @for, @switch, @case, @defer (when …), @let), legacy structural directives (*ngIf, *ngFor), or expression-bound attributes ([x], (x)). Inline-template findings anchor at the @Componentdecorator line and are suppressible with// fallow-ignore-next-line complexitydirectly above the decorator; external-template findings carry an HTML comment action and are suppressible with<!— fallow-ignore-file complexity —>` at the top of the template.
Options
Thresholds
| Flag | Description |
|---|---|
--max-cyclomatic <N> | Maximum cyclomatic complexity before reporting (default: 20) |
--max-cognitive <N> | Maximum cognitive complexity before reporting (default: 15) |
--max-crap <N> | Maximum CRAP score before reporting (default: 30.0). Functions meeting or exceeding this score appear alongside complexity findings. Pair with --coverage for accurate per-function CRAP; without it fallow estimates coverage from the module graph. |
--effort <LEVEL> | Filter refactoring targets by effort level: low, medium, or high. Only targets at or below the specified effort are shown. Implies --targets. |
Output
| Flag | Description |
|---|---|
-f, --format <FORMAT> | Output format: human (default), json, sarif, compact, markdown, codeclimate, gitlab-codequality, pr-comment-github, pr-comment-gitlab, review-github, review-gitlab, badge |
--top <N> | Show only the top N results per section (findings, file scores, hotspots, targets) |
--sort <METRIC> | Sort complexity findings by: cyclomatic (default), cognitive, lines, severity |
--explain | Add metric explanations. In human format, explanations are always shown. In JSON format, adds a _meta object with metric descriptions and docs links. |
--summary | Print a one-line summary of counts at the end of the run. In JSON format, adds a summary counts object. |
Section selection
By default, all standard sections are included. Use these flags to select individual sections:| Flag | Description |
|---|---|
--complexity | Show only complexity findings (functions exceeding thresholds). |
--file-scores | Show only per-file maintainability scores. Requires the full analysis pipeline (graph + dead code detection). File scores are sorted by maintainability index ascending (worst first). --sort and --baseline apply to complexity findings only, not file scores. |
--hotspots | Show only hotspot analysis: files that are both complex and frequently changing. Combines git churn history with complexity data. Uses git history; outside a git repository the section degrades to empty (with a stderr note) and exits 0 instead of erroring, so combined-mode --format json always emits a single document. |
--targets | Show only refactoring targets: ranked recommendations with priority scores, effort estimates, contributing factors, and evidence for AI agents. |
--score | Show only the project health score (0-100) with letter grade (A/B/C/D/F). The score is included by default when no section flags are set. As of v2.55.0, plain --score skips the churn-backed hotspot penalty so the score doesn’t run a git log shell-out per invocation. Pass --hotspots (or --targets with --score) to include the hotspot penalty; snapshot (--save-snapshot) and trend (--trend) flows still trigger hotspot vital signs so saved data stays complete. |
--coverage-gaps | Show runtime files and exports that no test dependency path reaches. Opt-in (default off). Configure severity via the coverage-gaps rule. |
--coverage <PATH> | Path to Istanbul-format coverage data (coverage-final.json) for accurate per-function CRAP scores. Produced by Jest, Vitest, c8, nyc. When provided, uses the canonical formula CC^2 * (1-cov/100)^3 + CC instead of the static binary model. Relative paths resolve against --root. |
--coverage-root <PATH> | Absolute prefix to strip from file paths in coverage data before prepending the project root. Use when coverage was generated in a different environment (CI runner, Docker), for example /home/runner/work/myapp. |
--runtime-coverage <PATH> | Merge runtime coverage into the health report. Accepts a V8 coverage directory, a single V8 JSON file, or a single Istanbul coverage map JSON file. A single local capture is free and does not require a license; continuous or multi-capture runtime monitoring requires a valid license or trial. |
--min-invocations-hot <N> | Threshold for hot-path classification when --runtime-coverage is active (default: 100). |
--min-observation-volume <N> | Minimum total trace volume before the sidecar may emit high-confidence safe_to_delete / review_required verdicts. Below this, confidence is capped at medium (default: 5000). |
--low-traffic-threshold <RATIO> | Fraction of total trace count below which an invoked function is classified low_traffic rather than active (default: 0.001 = 0.1%). |
--complexity --hotspots). Without any section flags, all sections are included.
Health score options
| Flag | Description |
|---|---|
--min-score <N> | Fail if the health score is below this threshold (exit code 1). Implies --score. Use as a CI quality gate. |
Hotspot options
| Flag | Description |
|---|---|
--since <DURATION> | Git history window for hotspot analysis (default: 6m). Accepts durations (6m, 90d, 1y, 2w) or ISO dates (2025-06-01). |
--min-commits <N> | Minimum number of commits for a file to be included in hotspot ranking (default: 3). |
--ownership | Attach ownership signals to each hotspot entry: bus factor (Avelino truck factor), contributor count, top contributor with stale-days, recent contributors (top-3), suggested_reviewers, declared CODEOWNERS owner, ownership drift, unowned-hotspot detection. Human output gains a project-level summary line above the hotspot list. Test paths get a [test] tag. Implies --hotspots. Uses git history; outside a git repository the hotspot/ownership section degrades to empty. |
--ownership-emails <MODE> | Privacy mode for author emails: handle (default, local-part only with GitHub noreply unwrap), hash (stable xxh3: pseudonym), or raw (full email). Implies --ownership. Use hash in regulated environments where author identities are sensitive. Configure the default via health.ownership.emailMode in config. |
Scoping
| Flag | Description |
|---|---|
-w, --workspace <NAME> | Scope output to one or more workspace packages while keeping the full cross-workspace graph. Comma-separated values, globs (apps/*, @scope/*), and !-prefixed negation are supported. Vital signs, health score, hotspots, file scores, findings, and summary.files_analyzed are all recomputed against the scoped subset. |
--changed-since <REF> | Only analyze functions in files changed since the given git ref (e.g., main, HEAD~5). Also applies to hotspot analysis. |
--group-by <owner|directory|package|section> | Partition the report into per-group sections. JSON output adds grouped_by plus a groups array; each group contains its own vital_signs, health_score, findings, file_scores, hotspots, large_functions, and targets recomputed against the group’s files. The top-level metrics stay project-wide so consumers that ignore grouping still see the project headline. Human output adds a per-group score / files / hot / p90 summary block (sorted worst-first when --score). SARIF tags every result with properties.group and CodeClimate adds a top-level group field per issue, so GitHub Code Scanning and GitLab Code Quality can partition findings per team / package. Compact, markdown, and badge fall back to ungrouped output with a stderr note pointing at --format json. |
Snapshots & trends
| Flag | Description |
|---|---|
--save-snapshot [PATH] | Save a vital signs snapshot for trend tracking. Default path: .fallow/snapshots/<timestamp>.json. Forces file-scores and hotspot computation for complete metrics. |
--trend | Compare current metrics against the most recent saved snapshot. Reads from .fallow/snapshots/ and shows per-metric deltas with directional indicators (improving/declining/stable). Implies --score. |
Baseline
| Flag | Description |
|---|---|
--save-baseline | Save current complexity findings as a baseline for future comparison |
--baseline | Compare against a saved baseline and only report new findings. Applies to complexity findings only, not file scores. |
Exit codes
| Code | Meaning |
|---|---|
0 | No functions exceed the configured thresholds |
1 | One or more functions exceed a threshold |
Maintainability index formula
The per-file maintainability index is a weighted composite score:| Component | Description | Weight |
|---|---|---|
complexity_density | Total cyclomatic complexity / lines of code | ×30 |
dead_code_ratio | Fraction of value exports with zero references (0.0–1.0). Type-only exports (interfaces, type aliases) are excluded. | ×20 |
fan_out_penalty | Logarithmic scaling of import count, capped at 15 points. Each additional import adds less penalty than the last. | max 15 |
| Metric | Description |
|---|---|
fan_in | Number of files that import this file |
total_cyclomatic | Sum of cyclomatic complexity across all functions |
total_cognitive | Sum of cognitive complexity across all functions |
function_count | Number of functions in the file |
lines | Total lines of code |
crap_max | Highest CRAP score among the file’s functions. Combines cyclomatic complexity with test coverage to estimate untested risk. See CRAP metric for details. |
crap_above_threshold | Number of functions in the file with a CRAP score at or above the threshold (default: 30). |
Hotspot score formula
The hotspot score identifies files that are both complex and frequently changed. These files are the most likely to harbor bugs and slow down development. The score combines git churn with complexity density:| Component | Description |
|---|---|
weighted_commits | Recency-weighted commit count using exponential decay with a 90-day half-life. Recent changes contribute more than old ones. |
complexity_density | Cyclomatic complexity / lines of code. Measures how densely complex the code is. |
Per-file hotspot metrics
Each hotspot entry includes:| Metric | Description |
|---|---|
path | Relative file path |
score | 0–100 hotspot score (higher = higher risk) |
commits | Raw commit count in the analysis window |
weighted_commits | Recency-weighted commit count (exponential decay, 90-day half-life) |
lines_added | Total lines added in the analysis window |
lines_deleted | Total lines deleted in the analysis window |
complexity_density | Cyclomatic complexity / lines of code |
fan_in | Blast radius: number of files importing this file |
trend | Accelerating, Stable, or Cooling. Shows the direction of recent change activity. |
Hotspot summary
The hotspot summary (included in JSON output) provides context about the analysis:| Field | Description |
|---|---|
since | Display string for the analysis window (e.g., “6 months”) |
min_commits | Minimum commit threshold used |
files_analyzed | Files meeting the min_commits threshold |
files_excluded | Files below the min_commits threshold |
shallow_clone | Detection flag. Warns if a shallow clone was detected. |
Hotspot analysis uses git history. Outside a git repository the section degrades to empty with a
note: hotspot analysis skipped: no git repository found at project root on stderr (suppressed by --quiet); standalone fallow health --hotspots --format json exits 0 with hotspots and hotspot_summary omitted, and combined-mode --format json always emits a single JSON document. Shallow clones may produce incomplete results. Fallow detects this and warns you. For best results, ensure a full clone with git fetch --unshallow.Ownership analysis
Pass--ownership (alongside or instead of --hotspots) to enrich each hotspot entry with ownership signals derived from git author history and the repository’s CODEOWNERS file. Useful for surfacing knowledge-loss risk, finding unowned high-churn files, and routing review requests.
Project-level summary
Human output prepends a summary line above the hotspot list showing how many hotspots depend on a single recent contributor and the top authors across the set:Per-hotspot ownership fields
| Field | Description |
|---|---|
bus_factor | Avelino truck factor: minimum contributors covering at least 50% of recency-weighted commits. 1 is the canonical “single point of failure” signal. |
contributor_count | Distinct authors after bot-pattern filtering. |
top_contributor | Object with identifier, format (raw/handle/hash), share (0..1), stale_days, and commits for the highest-share contributor. The identifier is rendered per the configured ownership.emailMode; do not assume it is an email address. |
recent_contributors | Up to three additional contributors by share (top-3 excluding the top contributor). |
suggested_reviewers | Subset of recent_contributors whose stale_days is below 90. First-class field so AI agents can route “Request review from @X, @Y” without re-filtering. Omitted when empty. |
declared_owner | The CODEOWNERS-resolved primary owner for this file, when a rule matches. |
unowned | Tristate: true = a CODEOWNERS file exists but no rule matches; false = a rule matches; null = no CODEOWNERS file was discovered (cannot determine). |
drift | True when the file’s original author no longer maintains it. Fires only when file age >= 30 days AND the original author’s recency-weighted share is below 10%. |
drift_reason | Human-readable explanation of the drift, populated only when drift is true. |
Severity in human output
Thebus= marker is color-coded proportional to the actual risk:
bus=1 (sole author): red + bold when share is 100% (one person, no co-authors)bus=1 (at risk): red + bold when bus=1 AND trend is accelerating (active, high-concentration file)bus=1: yellow for the common case (bus=1 without extreme share or acceleration)bus=2/bus=N: dimmed (healthy)
Test-path tag
Files matching common test conventions (**/__tests__/**, **/__mocks__/**, **/*.test.*, **/*.spec.*, **/test/**, **/tests/**) are intentionally kept in the hotspot ranking (test maintenance IS real work) but tagged with [test] so readers can distinguish them from production code. JSON consumers see an is_test_path: true field.
Ownership-derived JSON actions
When--ownership is enabled, the actions array on hotspot entries gains up to three additional action types so AI agents can act on ownership signals:
| Action type | When emitted | Suggested follow-up |
|---|---|---|
low-bus-factor | bus_factor == 1 | Add a second reviewer to the file. The note names specific candidate reviewers (from suggested_reviewers) when they exist, softens for low-commit files, or is omitted to avoid boilerplate. |
unowned-hotspot | unowned == true (CODEOWNERS exists, no rule matches) | Add a CODEOWNERS entry. The action’s suggested_pattern field offers a sensible default (the deepest directory containing the file, e.g. /src/api/users/), and a heuristic: "directory-deepest" field discriminates the strategy. |
ownership-drift | drift == true | Update CODEOWNERS to the new top contributor. |
Email privacy
By default, fallow renders author emails as their local-part (e.g.alice@example.com shows as alice). GitHub-style noreply prefixes are unwrapped (12345+alice@users.noreply.github.com shows as alice). Override with --ownership-emails:
| Mode | Output | When to use |
|---|---|---|
handle (default) | Local-part only | Most projects. Balances readability and privacy. |
hash | xxh3:<16hex> non-cryptographic pseudonym | Regulated environments where author identities are sensitive. |
raw | Full email address | Public OSS repositories where git history is already exposed. |
xxh3 for stable pseudonyms across runs but is not a cryptographic primitive: a known list of org emails can be brute-forced into a rainbow table. The intent is to keep raw PII out of CI artifacts (SARIF, code-scanning uploads), not to provide strong privacy.
Configuration
Configure ownership defaults underhealth.ownership:
botPatterns are glob patterns matched against the raw author email. The default list covers *\[bot\]* (escaped brackets, since globset treats [abc] as a character class), dependabot*, renovate*, github-actions*, svc-*, and *-service-account*. *noreply* is intentionally NOT a default: most human GitHub contributors commit from <id>+<handle>@users.noreply.github.com (GitHub’s privacy default), so filtering on noreply would silently exclude the majority of real authors. The actual bot accounts already match via \[bot\].
Ownership signals are computed only when
--hotspots runs and a file passes the min_commits threshold (default 3). This gates the analysis on enough history to be meaningful. Squash-merged commits inflate single-author dominance, and shallow clones distort the picture further; fallow warns about both when --ownership is active.Vital signs
When file-scores are enabled (either explicitly via--file-scores or implicitly via --save-snapshot), the JSON output includes a vital_signs object with high-level codebase health metrics. These metrics provide a single-glance summary of code quality.
| Metric | Description |
|---|---|
dead_file_pct | Percentage of files with zero inbound references |
dead_export_pct | Percentage of value exports with zero references |
avg_cyclomatic | Average cyclomatic complexity across all functions |
critical_complexity_pct | Percentage of functions at or above the critical cyclomatic threshold. Used by health score formula v2. |
p90_cyclomatic | 90th percentile cyclomatic complexity |
duplication_pct | Percentage of duplicated code. Populated automatically when --score is used; null otherwise. |
hotspot_count | Number of files with a hotspot score >= 50 |
hotspot_top_pct_count | Number of positive-score files in the top 1% of the within-project hotspot ranking |
maintainability_avg | Average maintainability index across all scored files |
maintainability_low_pct | Percentage of scored files with maintainability index below 70 |
unused_dep_count | Number of unused dependencies detected |
unused_deps_per_k_files | Unused dependencies per 1,000 files |
circular_dep_count | Number of circular dependency cycles detected |
circular_deps_per_k_files | Circular dependency cycles per 1,000 files |
unit_size_profile | Per-function risk distribution by LOC (percentage per bin) |
functions_over_60_loc_per_k | Functions above 60 LOC per 1,000 functions |
unit_interfacing_profile | Per-function risk distribution by parameter count (percentage per bin) |
p95_fan_in | 95th percentile fan-in across files |
coupling_high_pct | Percentage of files exceeding the fan-in threshold |
counts | Raw numerator/denominator counts behind the percentage metrics (e.g. dead_files, total_files, dead_exports, total_exports, unused_deps, circular_deps) |
Snapshots
Use--save-snapshot to capture a point-in-time record of your codebase’s vital signs. Snapshots enable trend tracking across builds, sprints, or releases.
--save-snapshot flag forces file-scores and hotspot computation so that all vital signs metrics are available, regardless of which section flags are passed.
Snapshot format
snapshot.json
| Field | Description |
|---|---|
snapshot_schema_version | Schema version for forward compatibility (currently v8) |
version | Fallow version that produced the snapshot |
timestamp | ISO 8601 timestamp of the snapshot |
git_sha | Current git commit SHA (if in a git repo) |
git_branch | Current git branch name |
shallow_clone | Whether a shallow clone was detected |
vital_signs | High-level health metrics (see Vital signs) |
counts | Raw numerators and denominators behind the percentage metrics |
score | Project health score (0-100). Present in v2+ snapshots. |
grade | Letter grade (A/B/C/D/F). Present in v2+ snapshots. |
Examples
Example output
$ fallow health --file-scores --top 3
$ fallow health --hotspots --top 3
JSON output
Complexity findings
$ fallow health --format json --top 2
With file scores
When--file-scores is used, the JSON output includes additional fields:
$ fallow health --file-scores --format json --top 2
Without
--file-scores, the file_scores array and summary.files_scored / summary.average_maintainability / summary.coverage_model fields are omitted entirely from the JSON output. The coverage_model field indicates how CRAP coverage was determined: static_estimated (default, per-function estimation from export references: 85% direct, 40% indirect, 0% untested) or istanbul (real per-function statement coverage from --coverage flag or auto-detected coverage-final.json). Each file score includes crap_max (highest CRAP score among the file’s functions) and crap_above_threshold (count of functions at or above the CRAP threshold).With hotspots
When--hotspots is used, the JSON output includes a hotspots array and hotspot_summary:
$ fallow health --hotspots --format json --top 2
Without
--hotspots, the hotspots array and hotspot_summary fields are omitted entirely from the JSON output. Hotspot analysis can be combined with --file-scores to include all sections in a single output.With refactoring targets
When--targets is used, the JSON output includes a targets array:
$ fallow health --targets --format json --top 2
efficiency (priority / effort) descending, surfacing quick wins first. Each target includes efficiency, effort (low/medium/high), confidence (high/medium/low, based on data source reliability), and factors with raw value/threshold for programmatic use. The target_thresholds object exposes the adaptive percentile-based thresholds used for scoring, so consumers can interpret scores in context. The evidence field provides actionable detail for supported categories (remove_dead_code, extract_complex_functions, break_circular_dependency, add_test_coverage); omitted for other categories.
Target categories
| Category | Label | Description |
|---|---|---|
urgent_churn_complexity | churn+complexity | Actively-changing file with growing complexity |
break_circular_dependency | circular dependency | File participates in a dependency cycle |
split_high_impact | high impact | High fan-in with high complexity; changes ripple widely |
remove_dead_code | dead code | Majority of exports are unused |
extract_complex_functions | complexity | Contains functions with very high cognitive complexity |
extract_dependencies | coupling | Excessive imports reduce testability and increase coupling |
add_test_coverage | untested risk | Multiple complex functions lack test dependency path. Fires when a file has 2+ functions above the CRAP threshold and complexity density > 0.3. The crap_max contributing factor appears on these targets. |
Without
--targets, the targets array and target_thresholds are omitted entirely from the JSON output.With vital signs
When file-scores are enabled (via--file-scores or implicitly via --save-snapshot), the JSON output includes a top-level vital_signs object:
$ fallow health --file-scores --format json (vital_signs excerpt)
Without file-scores enabled, the
vital_signs object is omitted from the JSON output. The duplication_pct field is populated automatically when --score is used, or when duplication analysis runs via fallow dupes, bare fallow, or fallow dead-code --include-dupes. It is null otherwise.With health score
When--score is used, the JSON output includes a health_score object with score, grade, and penalty breakdown:
$ fallow health --score --format json (health_score excerpt)
100 - sum(penalties) == score. formula_version identifies the scoring formula; version 2 uses scale-invariant density and tail metrics such as critical_complexity_pct, hotspot_top_pct_count, and dependency densities per 1,000 files. Penalty fields are null (absent from JSON) when the corresponding pipeline didn’t run. --score computes the score and automatically runs duplication analysis; add --hotspots (or combine --score --targets) when the score should include the churn-backed hotspot penalty.
Letter grades: A (score >= 85), B (70-84), C (55-69), D (40-54), F (below 40).
Without
--score, the health_score object is omitted entirely from the JSON output. --min-score implies --score.With trend
When--trend is used, the JSON output includes a health_trend object comparing current metrics against the most recent saved snapshot:
$ fallow health --trend --format json (health_trend)
direction (improving, declining, or stable) based on whether the change is beneficial. Percentage metrics include previous_count and current_count with raw numerator/denominator. The overall_direction summarizes across all metrics by majority vote.
--trend requires at least one saved snapshot in .fallow/snapshots/. Use --save-snapshot to create snapshots first. Without any snapshots, the health_trend object is omitted.With coverage gaps
When--coverage-gaps is used, the JSON output includes a coverage_gaps object listing runtime files and exports that no test dependency path reaches. This helps identify production code with no transitive test coverage.
The coverage-gaps rule supports error, warn, or off severity in your config (default off):
$ fallow health --coverage-gaps --format json
files array lists runtime files where no export is reached by any test dependency path. The exports array lists individual exports in otherwise-covered files that lack test reachability.
Without
--coverage-gaps, the coverage_gaps object is omitted entirely from the JSON output. The flag is opt-in and the coverage-gaps rule defaults to off.With runtime coverage
When--runtime-coverage is used, the JSON output includes a runtime_coverage object that merges runtime evidence into the standard health report.
$ fallow health --runtime-coverage ./coverage --format json
| Field | Meaning |
|---|---|
verdict | Overall runtime verdict: clean, cold-code-detected, hot-path-touched, license-expired-grace, or unknown. Promotes hot-path-touched over cold-code-detected in PR-review contexts when --diff-file (or --changed-since) is set. |
signals | Array of every signal post-processing detected, independent of verdict (the single most actionable one). Ordered severity-descending; omitted when empty. A PR run that hits both cold code and a hot path emits ["cold-code-detected", "hot-path-touched"]. |
summary | Aggregate counts of tracked, hit, unhit, and untracked functions; the coverage ratio; total trace volume; and the observation window. |
findings | Cold or unresolved functions. Each finding has a stable id (fallow:prod:<hash>), verdict (safe_to_delete / review_required / low_traffic / coverage_unavailable / active / unknown), and an evidence block explaining the verdict. |
hot_paths | Highest-invocation runtime functions, filtered by --min-invocations-hot. Each has a stable id (fallow:hot:<hash>) and percentile rank. |
watermark | Present only when trial/license grace rules require visible annotation in the output. |
warnings | Non-fatal coverage merge diagnostics. |
schema_version: 4 envelope was introduced with fallow-cov-protocol 0.2 and is extended additively as the protocol evolves. Protocol 0.3 added the optional summary.capture_quality block. Protocol 0.5 (current) added HotPath.end_line so the consumer can do line-range overlap against a --diff-file, and split the previous single-verdict surface into a signals array alongside verdict. Earlier schema_version: 3 output used a different finding shape (state instead of verdict, no stable IDs, renamed summary fields); see the v2.39.0 release notes for the full migration.
--runtime-coverage accepts a V8 directory, a single V8 JSON file, or a single Istanbul coverage map JSON file. A single local capture runs without a license. Use fallow coverage setup for first-run capture instructions; start a trial with fallow license when you need continuous or multi-capture runtime monitoring. For the conceptual model and trade-offs, see Runtime coverage.
Markdown output
Formatted for PR comments. Pipe directly togh pr comment:
$ fallow health --file-scores --format markdown --top 2
SARIF output
SARIF format for GitHub Code Scanning and other static analysis tools:$ fallow health --format sarif (excerpt)
Configuration
Configure default thresholds and ignore patterns in your config file:Inline suppression
Suppress individual functions from complexity findings with inline comments:// fallow-ignore-file complexity to suppress all functions in a file.
For coverage gaps: // fallow-ignore-file coverage-gaps excludes the file from untested-code reporting.
suggestInlineSuppression and baselines
The JSON output for each health finding includes an actions array with machine-actionable hints (refactor, add coverage, suppress). The suppress-line hint is omitted automatically when:
--baselineor--save-baselineis active. The baseline file already suppresses existing findings, so adding// fallow-ignore-next-linecomments on top would create dead annotations once the baseline regenerates.health.suggestInlineSuppressionis set tofalsein config. Use this when your team manages suppressions exclusively through hand-authored// fallow-ignore-*comments and does not want CI-driven inline suppression hints in JSON output.
actions_meta: { "suppression_hints_omitted": true, "reason": "baseline-active" | "config-disabled" } breadcrumb is added to the health JSON envelope so consumers can audit the omission.
Action selection by coverage tier
For findings triggered by CRAP, the primary action is selected by a formula-aware rule, with thecoverage_tier field choosing the description:
- Coverage CAN clear CRAP (
cyclomatic < maxCrap): the function’s CRAP score can be brought belowmaxCrapby improving coverage, sinceCRAP = CC^2 * (1 - cov/100)^3 + CCbottoms out atCCat 100% coverage. The tier picks the description:none(file not test-reachable, or Istanbul reports 0%): emitsadd-testswith a “start from scratch” description.partial(some coverage exists, Istanbul(0, 70), or estimated 40% band): emitsincrease-coveragewith a “targeted branch coverage” description, since the file already has a test path.high(Istanbul>= 70, or estimated 85% band): emitsincrease-coverage(NOT refactor) because additional coverage can still drop CRAP below threshold for a function whose cyclomatic is small enough.
- Coverage CANNOT clear CRAP (
cyclomatic >= maxCrap): no amount of coverage will bring CRAP under threshold; emitsrefactor-functioninstead, regardless of tier. Reducing cyclomatic complexity is the only remaining lever.
maxCyclomatic, a secondary refactor-function action is also emitted alongside the coverage action, but only when cognitive complexity is at or above maxCognitive / 2. The cognitive floor suppresses the secondary refactor on flat type-tag dispatchers and JSX render maps where high cyclomatic comes from a single switch with near-zero cognitive load (refactoring those is wrong-target advice).
See Inline suppression for all suppressible issue types.
See also
Health metrics explained
CRAP metric, maintainability index, hotspot scoring, and coverage model details.
Dead code analysis
Find unused code alongside complexity hotspots.
Configuration
Set default thresholds in your config file.
CI integration
Enforce complexity limits in your pipeline.