Skip to main content

Module schemas

Module schemas 

Source
Expand description

JSON Schema documents and zero-config rule defaults re-exported from fallow-config for embedders such as the MCP resource surface. JSON Schema documents and zero-config rule defaults, re-exported from fallow-config for embedders that must not depend on the config crate directly (the MCP server’s fallow://schema/* and fallow://issue-types resources). Each function returns the exact document the matching CLI command prints (fallow config-schema, fallow plugin-schema, fallow rule-pack-schema), so a cached resource and a CLI dump agree.

Functions§

config_schema
JSON Schema of the fallow config file (fallow config-schema).
default_rule_severities
The zero-config rules.* severities as a flat JSON object keyed by config key (unused-exports, security-sink, …), serialized once from RulesConfig::default(). This is the single source of default severities for fallow schema and the MCP issue-type resource. Infallible in practice (a flat struct of Severity enums); the empty-object fallback keeps callers panic-free and simply yields no default severity if serialization ever changed shape.
is_rule_severity_key
Whether key names a rules.* config field (a kebab-case key of default_rule_severities).
plugin_schema
JSON Schema of a user-authored external plugin (fallow plugin-schema).
rule_pack_schema
JSON Schema of a declarative rule pack (fallow rule-pack-schema).