Expand description
Metric and rule definitions for explainable CLI output.
Provides structured metadata that describes what each metric, threshold,
and rule means, consumed by the _meta object in JSON output and by
SARIF fullDescription / helpUri fields.
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§
- all_
rules - Every registered rule in registry order: dead-code, health, duplication,
flags, then security. The order is the
fallow schemaissue_typesorder and thefallow://issue-typesresource order. - bare_
rule_ id - The rule id without its
fallow/orsecurity/namespace prefix, which is the canonical issue code (unused-export,sql-injection). - coverage_
analyze_ meta - Build the
_metaobject forfallow coverage analyze --format json --explain. - coverage_
setup_ meta - Build the
_metaobject forfallow coverage setup --json --explain. - explain_
issue_ type - Build the typed standalone explain output for a user-facing issue token.
- 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_
command - The command family a rule reports under (
dead-code,health,dupes,flags, orsecurity), derived from the registry array that owns it. Membership is by id (unique across registries); the registries areconstslices, so pointer identity is not stable across uses. - 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.
- unknown_
explain_ error - Structured error for an unrecognized
fallow explainissue type, with suggestions matched to whether the token looks security-related.