Expand description
Programmatic API contract types for fallow.
Runtime execution for dead-code and duplication lives here. Health output assembly is also API-owned, with the concrete runner injected while the remaining health pipeline moves out of the CLI crate. This crate owns the CLI-independent option, error, and output contracts so NAPI, future Rust embedders, and the engine facade can share them without depending on the CLI crate.
Re-exports§
pub use audit_output::AuditAttribution;pub use audit_output::AuditCodeClimateOutputInput;pub use audit_output::AuditJsonHeaderInput;pub use audit_output::AuditJsonOutputInput;pub use audit_output::AuditSarifOutputInput;pub use audit_output::AuditSummary;pub use audit_output::AuditVerdict;pub use audit_output::build_audit_codeclimate;pub use audit_output::build_audit_codeclimate_issues;pub use audit_output::build_audit_header_json;pub use audit_output::build_audit_header_map;pub use audit_output::build_audit_sarif;pub use audit_output::serialize_audit_json;pub use combined_output::CombinedCheckJsonSection;pub use combined_output::CombinedJsonOutputInput;pub use combined_output::serialize_combined_dupes_json;pub use combined_output::serialize_combined_health_json;pub use combined_output::serialize_combined_json;pub use compact_output::build_compact_lines;pub use compact_output::build_duplication_compact_lines;pub use compact_output::build_grouped_compact_lines;pub use compact_output::build_health_compact_lines;pub use dead_code_codeclimate::build_codeclimate;pub use dead_code_sarif::build_sarif;pub use dupes_output::AttributedCloneGroup;pub use dupes_output::AttributedCloneGroupFinding;pub use dupes_output::AttributedInstance;pub use dupes_output::CloneFamilyFinding;pub use dupes_output::CloneGroupFinding;pub use dupes_output::DupesReportPayload;pub use dupes_output::DuplicationGroup;pub use dupes_output::DuplicationGrouping;pub use dupes_output::build_duplication_codeclimate;pub use editor::EditorAnalysisOutput;pub use editor::EditorAnalysisResults;pub use editor::EditorAnalysisSession;pub use editor::EditorDeadCodeAnalysisOutput;pub use editor::EditorDuplicationReport;pub use editor::EditorInlineComplexityExceeded;pub use editor::EditorInlineComplexityFinding;pub use editor::EditorProjectAnalysisOutput;pub use editor::collect_inline_complexity;pub use editor::editor_duplicates;pub use editor::editor_extract;pub use editor::editor_results;pub use editor::editor_security;pub use editor::editor_suppress;pub use editor::filter_inline_complexity_by_changed_files;pub use grouped_output::ResultGroup;pub use grouped_output::UNOWNED_GROUP_LABEL;pub use grouped_output::build_duplication_grouping_with;pub use grouped_output::group_analysis_results_with;pub use grouped_output::largest_clone_group_owner_with;pub use health_codeclimate::build_health_codeclimate;pub use json_output::CheckJsonExtraOutputs;pub use json_output::CheckJsonOutputInput;pub use json_output::CheckJsonPayloadInput;pub use json_output::DuplicationJsonOutputInput;pub use json_output::GroupedCheckJsonOutputInput;pub use json_output::GroupedDuplicationJsonOutputInput;pub use json_output::harmonize_multi_kind_suppress_line_actions;pub use json_output::serialize_check_json;pub use json_output::serialize_check_json_payload;pub use json_output::serialize_duplication_json;pub use json_output::serialize_grouped_check_json;pub use json_output::serialize_grouped_duplication_json;pub use list_output::ListJsonEnvelope;pub use list_output::ListJsonOutputInput;pub use list_output::build_list_json_output;pub use list_output::serialize_list_json_output;pub use markdown_output::build_duplication_markdown;pub use markdown_output::build_grouped_markdown;pub use markdown_output::build_health_markdown;pub use markdown_output::build_markdown;pub use output_contracts::AuditOutput;pub use output_contracts::BoundariesListLogicalGroup;pub use output_contracts::BoundariesListRule;pub use output_contracts::BoundariesListZone;pub use output_contracts::BoundariesListing;pub use output_contracts::CombinedOutput;pub use output_contracts::FallowOutput;pub use output_contracts::ListBoundariesOutput;pub use output_contracts::ListEntryPointOutput;pub use output_contracts::ListOutput;pub use output_contracts::ListPluginOutput;pub use output_contracts::SecurityGate;pub use output_contracts::SecurityOutput;pub use output_contracts::SecurityOutputConfig;pub use output_contracts::SecuritySummaryOutput;pub use output_contracts::WorkspacesOutput;pub use runtime::DeadCodeProgrammaticOutput;pub use runtime::DuplicationProgrammaticOutput;pub use runtime::EngineHealthRunner;pub use runtime::HealthJsonReportInput;pub use runtime::HealthProgrammaticOutput;pub use runtime::ProgrammaticAnalysisContext;pub use runtime::ProgrammaticHealthNextStepFacts;pub use runtime::ProgrammaticHealthRun;pub use runtime::ProgrammaticHealthRunner;pub use runtime::compute_complexity_with_runner;pub use runtime::compute_health;pub use runtime::compute_health_with_runner;pub use runtime::derive_programmatic_health_execution_options;pub use runtime::detect_boundary_violations;pub use runtime::detect_circular_dependencies;pub use runtime::detect_dead_code;pub use runtime::detect_duplication;pub use runtime::resolve_programmatic_analysis_context;pub use runtime::run_boundary_violations;pub use runtime::run_circular_dependencies;pub use runtime::run_complexity_with_runner;pub use runtime::run_dead_code;pub use runtime::run_duplication;pub use runtime::run_health;pub use runtime::run_health_with_runner;pub use runtime::serialize_health_report_json;pub use sarif_output::annotate_sarif_results;pub use sarif_output::build_duplication_sarif;pub use sarif_output::build_grouped_duplication_sarif;pub use sarif_output::build_health_sarif;pub use security_output::SecurityGateMode;
Modules§
- audit_
output - Shared audit JSON payload contracts for programmatic consumers.
- ci_
output - Compatibility re-exports for CI output builders now owned by
fallow-output. - combined_
output - Combined JSON output assembly shared by CLI and programmatic consumers.
- compact_
output - dead_
code_ codeclimate - Shared dead-code CodeClimate issue construction.
- dead_
code_ sarif - Shared dead-code SARIF output assembly.
- dupes_
output - Shared duplication JSON payload contracts for programmatic consumers.
- editor
- Editor-facing analysis contracts shared by LSP and future editor adapters.
- grouped_
output - Shared grouped-output builders for programmatic and CLI consumers.
- health_
codeclimate - Shared health CodeClimate issue construction.
- json_
output - Shared JSON output assembly for CLI and programmatic consumers.
- list_
output - Shared list command JSON output assembly.
- markdown_
output - output_
contracts - Concrete output-contract aliases shared by schema and adapter crates.
- runtime
- Programmatic runtime entry points that do not depend on
fallow-cli. - sarif_
output - Shared SARIF output assembly for health and duplication reports.
- security_
output - Shared security JSON payload contracts for programmatic consumers.
Structs§
- Analysis
Options - Shared options for all one-shot analyses.
- CiIssue
- Normalized CodeClimate issue used by CI comment renderers.
- Complexity
Options - Options for complexity / health analysis.
- Complexity
RunOptions - Normalized programmatic complexity / health inputs shared by API, NAPI, and engine-backed runners.
- Complexity
Section Options - Input for deriving effective programmatic complexity sections.
- Dead
Code Filters - Issue-type filters for the dead-code analysis.
- Dead
Code Options - Options for dead-code-oriented analyses.
- Derived
Complexity Options - Derived section selection for programmatic health / complexity runs.
- Derived
Health Sections - Derived section selection for health runs.
- Duplication
Options - Options for duplication analysis.
- Grouped
Review Issues - Health
Section Options - Input for deriving effective health sections from command-neutral flags.
- PrComment
Render Input - Inputs for rendering a sticky PR/MR summary comment.
- Programmatic
Error - Structured error surface for the programmatic API.
- Review
Comment Render Input - Review
Envelope Render Input - Inputs for rendering a GitHub/GitLab review envelope.
- Review
Envelope Render Result - Rendered review envelope plus side-channel signals for CLI telemetry.
- Review
Envelope Truncation - Truncation signals produced while rendering a review envelope.
- Review
Gitlab Diff Refs - GitLab diff refs for a review-envelope position.
Enums§
- Changed
Files Error - Classification of a
git difffailure, so callers can pick their own wording (soft warning vs hard error) without re-parsing stderr. - CiProvider
- Supported CI review providers for generated comments.
- Complexity
Sort - Sort criteria for complexity findings.
- Duplication
Mode - Programmatic duplication mode selection.
- Ownership
Email Mode - Privacy mode for ownership-aware hotspot output.
- Target
Effort - Effort filter for refactoring targets.
Constants§
- COMMON_
ANALYSIS_ OPTION_ FLAGS - MARKER_
PREFIX_ V2 - Marker prefix appended to every v2 review-comment body.
- MARKER_
SUFFIX_ V2 - Closing of the v2 marker, after the fingerprint string.
- MAX_
COMMENT_ BODY_ BYTES - PROJECT_
LEVEL_ RULE_ IDS - Rule ids whose findings describe project-wide config state rather than a change touching a specific source line.
Functions§
- cap_
body_ with_ marker - command_
title - composite_
fingerprint - derive_
complexity_ options - Derive effective programmatic health / complexity section flags.
- derive_
complexity_ run_ options - Normalize public API complexity options into engine-owned run contracts.
- derive_
complexity_ sections - Derive effective programmatic health / complexity section flags.
- derive_
health_ sections - Derive effective health section flags for CLI and embedders.
- escape_
md - Escape a string for inclusion in a Markdown table cell.
- github_
check_ conclusion - group_
review_ issues_ by_ path_ line - Group consecutive same-(path, line) issues. Input is already sorted by
(path, line, fingerprint)so a single linear pass collects runs. - is_
project_ level_ rule - issues_
from_ codeclimate - issues_
from_ codeclimate_ issues - render_
pr_ comment - render_
review_ comment_ for_ group - Render one comment from a group of issues sharing the same
(path, line). - render_
review_ envelope - Render a provider-specific review envelope from typed CI issues.
- resolve_
git_ toplevel - Resolve the canonical git toplevel for
cwd. - review_
label_ from_ codeclimate - summary_
fingerprint - summary_
label - try_
get_ changed_ files_ with_ toplevel - Like
try_get_changed_files, but takes a pre-resolved canonicaltoplevelso callers (the LSP) can cache it across runs and avoid the extragit rev-parse --show-toplevelsubprocess on every save. - validate_
complexity_ options - Validate programmatic complexity / health inputs before invoking a concrete runner.