Expand description
CLI rendering for explainable rule output.
The rule registry and JSON contract live in fallow-api so embedders and
MCP do not depend on the CLI crate. This module keeps terminal rendering and
compatibility re-exports for existing CLI call sites.
Structs§
- RuleDef
- Rule definition for SARIF
fullDescriptionand JSON_meta. - Rule
Guide - Extra educational content for the standalone
fallow explain <issue-type>command. Kept separate fromRuleDefso SARIF and_metapayloads remain compact while terminal users and agents can ask for worked examples on demand.
Constants§
- CHECK_
RULES - Rule definitions for every dead-code family finding.
- DUPES_
RULES - Rule definitions for duplication findings.
- FLAGS_
RULES - Rule definitions for feature-flag findings.
- HEALTH_
RULES - Rule definitions for complexity and health findings.
- SECURITY_
RULES - Rule definitions for security candidate findings, including the data-driven tainted-sink catalogue categories.
Functions§
- coverage_
analyze_ meta - Build the
_metaobject forfallow coverage analyze --format json --explain. - coverage_
setup_ meta - Build the
_metaobject forfallow coverage setup --json --explain. - rule_
by_ id - Look up a rule definition by its SARIF rule ID across all rule sets.
- rule_
by_ token - Look up an issue type from a user-facing token.
- rule_
docs_ url - Build the docs URL for a rule.
- rule_
guide - Return worked-example and fix guidance for a rule.
- rule_
severity_ key - The
rules.*config key whose default severity gates findings ofrule: the rule’s ownconfig_keyfor a 1:1 rule, else the key of the shared rule its suppression token names (every tainted-sink catalogue category is gated bysecurity-sink, coverage findings bycoverage-gaps).Nonefor findings with norules.*gate at all (complexity and duplication metrics, refactoring targets, runtime-coverage verdicts); a suppression token that is not arules.*key (code-duplication,feature-flag) yieldsNonetoo, so every returned key resolves incrate::schemas::default_rule_severities. - security_
meta - Build the
_metaobject forfallow security --format json --explain. - serialize_
explain_ programmatic_ json - Serialize standalone explain output using the programmatic API contract.